flat assembler
Message board for the users of flat assembler.

Index > Main > 0b8000h flashing cursor problem,

Author
Thread Post new topic Reply to topic
lazer1



Joined: 24 Jan 2006
Posts: 185
lazer1
I use an 80x25 screen at address 0B8000h via:

Code:
   mov ax, 03h
   int 10h
    


everything fine, I can echo text in different colours,

one problem, the top left of the screen has a flashing _
sign,

it is always there whatever I write to that point, Sad
is there any way to get rid of that?
Post 17 Jun 2007, 20:05
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
http://www.ctyme.com/intr/rb-0086.htm

After reaching int3 the cursor dissapeared.
Code:
-a
0CDC:0100 mov ax, 0103
0CDC:0103 mov cx, 2000
0CDC:0106 int 10
0CDC:0108 int3
0CDC:0109
-g

AX=0003  BX=0000  CX=2000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
DS=0CDC  ES=0CDC  SS=0CDC  CS=0CDC  IP=0108   NV UP EI PL NZ NA PO NC
0CDC:0108 CC            INT     3
-    


[edit]Corrected bug mentioned by lazer1[/edit]


Last edited by LocoDelAssembly on 18 Jun 2007, 16:44; edited 1 time in total
Post 17 Jun 2007, 21:09
View user's profile Send private message Reply with quote
lazer1



Joined: 24 Jan 2006
Posts: 185
lazer1
LocoDelAssembly wrote:
http://www.ctyme.com/intr/rb-0086.htm

After reaching int3 the cursor dissapeared.
Code:
-a
0CDC:0100 mov ax, 0103
0CDC:0103 mov cx, 4000
0CDC:0106 int 10
0CDC:0108 int3
0CDC:0109
-g

AX=0003  BX=0000  CX=4000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
DS=0CDC  ES=0CDC  SS=0CDC  CS=0CDC  IP=0108   NV UP EI PL NZ NA PO NC
0CDC:0108 CC            INT     3
-    



ok, I got rid of the flashing cursor now. I think the 4000 you said
should be 2000h as it says bits 6,5==0,1 of ch
makes the cursor invisible.

I couldnt see mention of int3 but I used that,

is int3 documented on ctyme?

the full sequence I used is:

Code:
    ; set up 80 x 25 text,
              mov ax,03h
          int 10h

         mov ax, 103h
                mov cx, 2000h
               
            int 10h
             int3
                
    
Post 18 Jun 2007, 16:16
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
You are right. It worked anyway because as the documentation says, any value != 0 hides the cursor on EGA/VGA.

About int3 http://www.ctyme.com/intr/rb-0007.htm . I used it just to stop execution at that point but you shouldn't use it if you are not debugging (unless you had installed a handler to serve for another purpose).
Post 18 Jun 2007, 16:49
View user's profile Send private message Reply with quote
lazer1



Joined: 24 Jan 2006
Posts: 185
lazer1
LocoDelAssembly wrote:
You are right. It worked anyway because as the documentation says, any value != 0 hides the cursor on EGA/VGA.

About int3 http://www.ctyme.com/intr/rb-0007.htm . I used it just to stop execution at that point but you shouldn't use it if you are not debugging (unless you had installed a handler to serve for another purpose).


well the code functioned with the int3 but I will remove that,

BTW removing the flashing cursor has removed another problem:

ever since I began with x86 asm every few seconds there would be
a screen glitch where the entire screen would flicker once,

removing the flashing cursor and this problem has gone so I think
the flashing cursor hasnt been implemented properly on at least
2 of my machines.

the screen now is an absolutely stable image,
Post 20 Jun 2007, 15:28
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Quote:

well the code functioned with the int3 but I will remove that,

If your code is executing without any OS is probable that the BIOS has an Int3 handler with just an IRET instruction. I don't know what happens under DOS but probably the same.
Post 20 Jun 2007, 15:42
View user's profile Send private message 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 GitHub, YouTube, Twitter.

Website powered by rwasa.