NASM Stupid problem :)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Merlino The Wizard

NASM Stupid problem :)

Post 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
anubis

Re:NASM Stupid problem :)

Post 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
Post Reply