Category:8086 Assembly: Difference between revisions

m
No edit summary
Line 49:
As with all processors that use a stack, if you push one or more registers and want to restore the backed-up values correctly, you must pop them in the reverse order. You can pop them out of order on purpose to swap registers around. In fact, this is a quick way to move the segment from <code>DS</code> into <code>ES</code>, or vice-versa:
<lang asm>push DS
pop ES ;you can't do "mov es, ds" but you can do this!</lang>
 
===Arithmetic===
1,489

edits