NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: Andy on March 02, 2012, 12:27:35 PM
-
I tried to understand how it works XLAT instruction and I wrote this short code for test:
mov bx,Table
mov al,4
xlat
mov dl,al
mov ah,2
int 21h
mov ah,4Ch
int 21h
Table db '0123456789'
The compilations works fine but the result is not what I really expect. If I understood well, XLAT should put in al the ascii value of 4, this mean 34h. So I expect to be write to STDOUT the character of 34h but I still get this:
http://solidfiles.com/d/8c8aa1ca3d
Where is my wrong?
-
Assembling this as a .com file?
org 100h ; tell Nasm where dos will load us
See if that helps.
Best,
Frank
-
Yeah, that works. Thank you!