exit16.asm 593 B

12345678910111213141516171819202122
  1. ; Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details
  2. ;-----------------------------------------------------------------------------
  3. ; exit 16-bit helper
  4. ;
  5. ; Used to clean up 32-bit arena on exit, so as to release as many
  6. ; selectors and as much memory as possible.
  7. ;
  8. ; Call with: BX = 32-bit CS to free
  9. ; SI:DI = 32-bit memory handle to free
  10. ; DL = exit status
  11. .type "bin"
  12. mov ax, 0x0001
  13. int 0x31
  14. mov ax, 0x0502
  15. int 0x31
  16. mov al, dl
  17. mov ah, 0x4c
  18. int 0x21