Hacker News new | past | comments | ask | show | jobs | submit login

Well, in order to function in the test suite, the exit codes have to propagate! Arggh!



I was wrong, I looked at the source and forgot all the CP/M-inherited syscalls are supposed to lack an exit code. The MS-DOS 2 exit-with-return-call method works, and it looks like WSL2 can propagate that from its' Linux VM into Win32-land.

  C:\Users\andrew\emu2>bash -c "ndisasm x.com"
  00000000  B8214C            mov ax,0x4c21
  00000003  CD21              int 0x21
  
  C:\Users\andrew\emu2>bash -c "./emu2 ./x.com"
  
  C:\Users\andrew\emu2>echo %ERRORLEVEL%
  33


ah, good




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: