flat assembler
Message board for the users of flat assembler.

Index > DOS > DOS and ntvdm differences

Author
Thread Post new topic Reply to topic
bMind



Joined: 01 Jul 2006
Posts: 2
Location: Russia,Zheleznogorsk
bMind
I code DOS application and write to [es:di] word correctly.
It works in DOS but in ntvdm does not.
Why it happens? How to solve it?
Code:
org 100h
use16

@@:
mov ax,0B800h
mov es,ax

mov ah,7       ;set attribute
mov si,mess1
xor di,di
cld

@@:
lodsb

cmp al,'$'
jz .done

mov [es:di],ax
add di,2
jmp @b

.done:
mov ah,10h
int 16h

int 20h

mess1 db "Press ANYKEY please$"
    
Post 01 Jul 2006, 15:22
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7756
Location: Kraków, Poland
Tomasz Grysztar
Interesting, video memory seems to be somehow inactive at startup under NTVDM, however it gets activated if you call the INT 10h somehow, for example adding this simple check:
Code:
mov ah,0Fh
int 10h
cmp al,3
jne no_text_mode    

(which anyway is recommended when you do such access like above) at the beginning makes it work.
Post 01 Jul 2006, 15:58
View user's profile Send private message Visit poster's website Reply with quote
bMind



Joined: 01 Jul 2006
Posts: 2
Location: Russia,Zheleznogorsk
bMind
Thank you, Tomasz. It works.

PS:close this topic please, I don't found how.
Post 02 Jul 2006, 01:48
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Tomasz: i think it's quite logical behavior... for easier running of apps that doesn't make any output to screen
Post 02 Jul 2006, 08:50
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.