flat assembler
Message board for the users of flat assembler.

Index > Main > Write without INT 21h???

Author
Thread Post new topic Reply to topic
joachim_neu



Joined: 22 Dec 2003
Posts: 139
joachim_neu 25 Dec 2003, 16:51
hello,

how do you write a string without interrupt 21h??

JOACHIM NEU
Post 25 Dec 2003, 16:51
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 25 Dec 2003, 16:59
You can use for example 0x0e function form int 0x10. Try this:

Code:
        mov     si,szText
   mov     ah,0x0e
     mov     bx,0x0007
  .more:
   lodsb
       or      al,al
       jz      .done
       int     0x10
        jmp     .more
  .done: 

(...)

szText db "some text", 0
    
Post 25 Dec 2003, 16:59
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 25 Dec 2003, 18:08
things which are visible on screen are stored in segment B800. Each character is described by 2 bytes. First is ASCII code of character, second is it's color and background. You should search something about segment B800 on net.
Post 25 Dec 2003, 18:08
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
joachim_neu



Joined: 22 Dec 2003
Posts: 139
joachim_neu 26 Dec 2003, 12:43
hello,

I've found a solution:

Code:
mov ah,0fh
int 10h
mov dl,01h
mov dh,01h
mov ah,02h
int 10h
mov ah,09h
mov cx,01h
mov al,ASCII-CODE in HEX
mov bl,0007h
int 10h
mov ah,0fh
int 10h
mov dl,01h
mov dh,01h
mov ah,02h
int 10h
mov ah,09h
mov cx,01h
mov al,ASCII-CODE in HEX
mov bl,0007h
int 10h
    


Embarassed Embarassed It's very long... Embarassed Embarassed I've done it 2 ones, 'cause with only 1 it doesn't work.

JOACHIM NEU
Post 26 Dec 2003, 12:43
View user's profile Send private message Visit poster's website 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.