Wolfgang Kern wrote:
....
> Good idea, but be aware to find some different interpretations of
> register-numbers.
> ie: Herbert uses a functional logic for ordering: eax,edx,..
> while I use the given opcode-patterns: eax,ecx,edx... to match PUSHAD
Yeah... the registers *have* real names - 3-bit numbers - which
*almost*, but not quite, match Herbert's scheme.
I couldn't resist adding this. Rosario (I think that's his right name)
just posted this to a.l.a.
org 100h
section .text
start:
ax=13h; int 10h; /* switch to mode 13h
ax=0A000h; es=ax; /* load es with our "graphics screen" seg
di^=di; al=0; /* start at upper left [di=0] color 0 [al=0]
/* draw the lines
..1: cx=256; /* ++al is next color,
/* ++di is next position
..2: [es:di]=al; ++al,di; --cx; !#.2;
/* after 256 incs, al is color 0 again
/* al=0; /* so skip this
di+=_320-256_; di<_320 * 199 + 256 _#.1
ah=0; int 16h; /* wait for a key
ax=3; int 10h; /* back to text mode
ret /* back to dos
Believe it or not, this assembles with Nasm... *after* passing through
Rosario's "preasm.exe" (I think I've got his code, if anyone actually
wants to assemble this). He finds this syntax much superior. I think I
mentioned... tastes differ!
Best,
Frank


|