home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 4,107 of 4,675   
   aen@nospicedham.spamtrap.com to notsaying@nospicedham.127.0.0.1   
   Re: small asm code (compo?)   
   24 Aug 20 12:45:12   
   
   On Mon, 24 Aug 2020 09:27:52 -0000 (UTC), "Kerr-Mudd,John"   
    wrote:   
   >...   
   >All those extra '$'s! I can see no-one wants to set the return code on   
   >exit, it adds to the fun of retaining the day number. 74 with rc   
   >...   
   A return code is nice and shiny, but you need a way to see it.  In   
   DOSBox that will do it:   
    nasm -f bin geterror.asm -o geterror.com   
   cpu 8086   
   org 100h   
   mov ah,4dh   
   int 21h   
   mov bx,outstr+3   
   .1: dec bx   
   xor ah,ah   
   div byte [ten]   
   or ah,30h   
   mov [bx],ah   
   test al,al   
   jne .1   
   mov ah,9   
   mov dx,bx   
   int 21h   
   ret   
   ten db 10   
   outstr db "   $"   
      
   Run it immediately after a program.   
   --   
   aen   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca