I can't figure out how to change the position where this appears on the screen.
I substituted 20 for the zero, and the A got chopped off.
Thanks.

direct:
mov ax,0b800h ; Segment address of color screen
mov ds,ax
mov si,0 ; Offset 0, upper-left corner of screen

mov ,word ptr 0441h ; 04h is character attributes, 41h is an 'A'
mov si,2 ; red 4 = red 0 = black 12 = br. red
mov ,word ptr 096eh ; n 1 = blue 7 = white
mov si,4 ; blue 2 = green 15 = brite white
mov ,word ptr 0264h ; d
mov si,6 ; green

Anyone found some sites with more info on the new e-bomb.
Posted on 2003-03-13 10:39:45 by skywalker
i think part of the problem is that when you put 20 in SI, the new location only applies to the first letter because for the other ones you simply move direct values into SI.

maybe try:
direct:
mov ax,0b800h ; Segment address of color screen
mov ds,ax
mov si,0 ; Offset 0, upper-left corner of screen

mov ,word ptr 0441h ; 04h is character attributes, 41h is an 'A'
add si,2 ; red 4 = red 0 = black 12 = br. red
mov ,word ptr 096eh ; n 1 = blue 7 = white
add si,2 ; blue 2 = green 15 = brite white
mov ,word ptr 0264h ; d
add si,2 ; green

so SI will always be 2 further everytime. i also recommend you set the video mode with
int 10h at the start of your program to make sure the video is set at the first page. hope that helped (though i'm no expert myself).
Posted on 2003-03-13 13:33:03 by Kobra
Originally posted by Kobra
i think part of the problem is that when you put 20 in SI, the new location only applies to the first letter because for the other ones you simply move direct values into SI.

maybe try:
direct:
mov ax,0b800h ; Segment address of color screen
mov ds,ax
mov si,0 ; Offset 0, upper-left corner of screen

mov ,word ptr 0441h ; 04h is character attributes, 41h is an 'A'

What I found out is that mov si,0 is row 1 and 158 would be the end of that row.
160 would be row 2 , column 1 etc. I could use the int 10 functions, but they are slower than the
direct video methods.
Posted on 2003-03-14 07:20:43 by skywalker
no no i only meant to use the int 10h function to set the video mode at the BEGINNING of the program, not to do the actual writing. you should set it to whatever resolution you are currently at the specify the first page, because, for example, if you run your program in a windows DOS box from the command line, the dos box may not start at the first page (because of previous programs) and you may not see your message at all. you don't have to, it's just good programming practice.
Posted on 2003-03-14 13:24:05 by Kobra