You might like to print out this page, or open it in a new window, so that you can refer to it as you take the tour.
This is the x86 equivalent of the 68K assembler example sample.sa, which contains just one simple subroutine: (For the 68K version, click here)
In this x86 version, registers ESI and EDI are used in place of the 68K A0 and A1 registers, and ECX and EAX replace D0 and D1.
ENDMARK EQU 80000000h
TOKCHAR EQU 0
TOKALT EQU 1
TOKBUF EQU 2
TOKCTR EQU 6
; Routine to move token block to buffer
CMP DWORD PTR [ESI+TOKBUF],0
RPT: LODSD ; Get token
CMP EAX,ENDMARK ; Hit end marker?
STOSD ; Move into destination