Mail Archives: djgpp/1998/10/16/11:56:28
Ron Barbosa wrote:
>
> Hey all...Does anyone know of a good (preferably online) tutorial for
> AT&T style x86 assembly?
http://www.programmersheaven.com/files/file0.htm
this site has links to several asm tutorials. however, most of the i86
world uses Masm, Tasm, or Nasm and variants on Intel syntax. I'd suggest
Nasm if you plan to do a lot of assembly. Other than that, you can pick
up the mechanics from these sources, and then do the AT&T translation.
It really isn't that hard. (to go from intel to at&t)
> -- BEGIN ASSEMBLY --
> les di,video_buffer ; load using ES. the address pointed to by video_buffer is loaded into ES:DI.
; the segment goes into ES, and the offset into DI
> mov al,BYTE PTR color ; load the byte contents of 'color' into AL
> mov ah,al ; and also AH
> move cx,320*200/2 ; load the size of the memory to be filled into CX
> rep stosw ; store the word in AX at the memory pointed to by ES:DI. increment DI, ; decrement CX. repeat until the Z flag is set by the CX decrement.
in other words, you are going to fill and area of memory with whatever
value 'color' has.
you really need to read the FAQ and supporting documents about the
differences between 16 and 32 bit pmode programming before you rush off
and use snippets from the 16bit games.
if you have info installed, type 'info libc a _far*' from the dos
prompt. the farpeek and farpoke family of functions will allow you to
accomplish the same thing.
- Raw text -