NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: nobody on February 06, 2008, 11:40:55 PM
-
I am learning how to use the int 16h, and I have 2 source codes, one works well and the other throws an error.
The first code is:
; Made by InternetNightmare 2004-01-16 Edit: 2004-08-30
; Grafikos Programavimas I dalis: Mode 13h
; English: Graphics Part I: Mode 13h
START: ; The beginning
mov ah,0
mov al,13h
int 10h
mov ax,0A000h
mov es,ax
mov ax,67
mov bx,112
mov cx,320
mul cx
add ax,bx
mov di,ax
mov dl,7
mov [es:di],dl
wl: ; mark wl
mov ah,0 ; 0 - keyboard BIOS function to get keyboard scancode
int 16h ; keyboard interrupt
jz wl ; if 0 (no button pressed) jump to wl
mov ah,0 ; Restore
mov al,3 ; textmode
int 10h ; for DOS
The other code is:
START:
MOV AH,0
INT 16h
The first code works well, but the second throws: "Cannot load VDM IPX/SPX support"
Can someone help me?
-
In my old DOS programs, I tended to just do a:
xor ax, ax
int 016h
to wait for a keypress (you shouldn't need to do a loop with function 0).
No clue if clearing AL matters at all there, but it might be worth a shot.
Also, your listings don't show that you're exiting to DOS, like with
mov ax, 04c00h
int 021h
If that's missing, then who knows what weird things will show up.
Hope that helps!
-
> int 10h ; for DOS
DOS code ?
> Can someone help me?
Problems:
1. Exiting (see post above)
2. Create DOS COM (org 256) or DOS MZ (org 0), but not "both in one"
3. Do you have DOS at all ? ;-)