Page 1 of 1

NASM Stupid problem :)

Posted: Fri Jul 19, 2002 10:27 am
by Merlino The Wizard
I believe this is the most stupid question you can see in this topics :)

I had a little problem with NASM:

I'd like to write directly in memory. For instance write a character on screen using the video memory instead of using int service. In "debug" (windows/dos simple debug) you write

mov ax,b800
mov es,ax
mov bp,0
es:
mov byte ptr [bp],65

How can I translate this syntax in the NASM syntax??

I'd like an example code if you please :)

Thanks... Merlino

Re:NASM Stupid problem :)

Posted: Fri Jul 19, 2002 12:21 pm
by anubis
Hi
try this code for NASM


mov ax,0b800h ;dont forget 0 before b
mov es,ax
mov byte [es:0000],65 ;also dont forget the byte thing


will write i think 'a' at mem address b800:0000.

this is good for debugging in Pmode. ;-)
hope this solves your problem