Skip to content

Instantly share code, notes, and snippets.

@djg
Created November 7, 2013 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djg/7346941 to your computer and use it in GitHub Desktop.
Save djg/7346941 to your computer and use it in GitHub Desktop.
procedure putpixel(x,y:word;color:byte); assembler;
asm
mov es,sega000
db 66h; xor ax,ax
db 66h; xor bx,bx
mov ax,x
mov bx,y
mov cl,color
db 67h,66h,8dh,1ch,9bh ;{lea ebx,[ebx+ebx*4]}
db 66h; shl bx,6
db 26h, 67h, 88h, 0ch, 03h ;{mov es:[ebx+eax],cl}
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment