News for hackers. Stuff that matters.
Re:Three lessons I learnt from porting Diablo by mahmud on Friday December 04, 2009 @04:46AM (#976077)
Yes, it's not that unusual for DOS programmers to "fall back" to assembly; inline assembly was much cleaner and far more effective than the disparate OS-hooks built into the various compilers. You could do asm { pushf, pop ax } to save the flags register, and do whatever you want with the machine (e.g. masking interrupts) but to do the same in pure C you would have had to use MS, Borland or Watcom extensions (yes, inline assembly was more portable and stable than the various levels of C standardization supported by the compilers.)

Other fun ones were variable length structs, and bitfields. http://www.ddj.com/cpp/184403480

There are no comments on this comment yet.