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,382 of 4,675    |
|    R.Wieser to All    |
|    Re: shorter code to print a 16bit number    |
|    30 Jul 21 21:23:19    |
      From: address@nospicedham.not.available              John,              >> sure about if that "loop" at the end will work though, as the INT 0x10       >> could easily trash cx..       >>       > Seems to be OK on this "DOS" VDM under XP - but yes, the int 10 was       > put in for the OP - originally the code put to a buffer at di, with a       > single       > print (ah=9, Int 21) at the end.              Yes, it also works here (XP Pro sp3). But its not something I will bet my       life on - because the specs say that a(ny) function call (including INTs)       may trash AX thru DX at will.              I know its hard to take, but the extra two bytes for a push/pop cx around       that last INT 0x10 are really needed. :-)              Regards,       Rudy Wieser              --- 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