Thread View: comp.lang.pascal.borland
2 messages
2 total messages
Started by Alexander Ern
Thu, 10 Jan 2002 14:39
No cursor routine in Windows
Author: Alexander Ern
Date: Thu, 10 Jan 2002 14:39
Date: Thu, 10 Jan 2002 14:39
45 lines
2094 bytes
2094 bytes
I'm using the following routine in my programs to turn on and off the cursor in my programs: unit Cursor; interface procedure CursorOff; procedure CursorOn; implementation procedure CursorOff; Assembler; ASM mov ah,3 ; mov bx,0 ; int 10h ; or ch,20h; mov ah,1 ; mov bx,0 ; int 10h ; end; procedure CursorOn; Assembler; ASM mov ah,3 ; mov bx,0 ; int 10h ; and ch,255-20h; mov ah,1 ; mov bx,0 ; int 10h ; end; end. This routine works fine in a full-screen DOS-box under Windows. But when I change to a windowed DOS-box, the cursor is visible again. How can I prevent my cursor to be visoble in both a windowed and full-screen DOS-box? Alex
Re: No cursor routine in Windows
Author: chris.newey
Date: Thu, 10 Jan 2002 17:22
Date: Thu, 10 Jan 2002 17:22
60 lines
2574 bytes
2574 bytes
Instead of the code below, use the following procedures...
PROCEDURE cursor_off;
begin
regs.ax := $0100;
regs.cx := $2607;
intr (16, regs);
end
To switch the cursor on, use an identical procedure but with the value 2607
with 0506. You alsoneed to declare a variable which is called "regs" in my
example. It is a REGISTERS type.
Hope i've been of some help!
"Alexander Ern," <erne@xs4all.nl> wrote in message
news:20020110.14390493@mis.configured.host...
I'm using the following routine in my programs to turn on and off the
cursor in my programs:
unit Cursor;
interface
procedure CursorOff;
procedure CursorOn;
implementation
procedure CursorOff; Assembler;
ASM
mov ah,3 ;
mov bx,0 ;
int 10h ;
or ch,20h;
mov ah,1 ;
mov bx,0 ;
int 10h ;
end;
procedure CursorOn; Assembler;
ASM
mov ah,3 ;
mov bx,0 ;
int 10h ;
and ch,255-20h;
mov ah,1 ;
mov bx,0 ;
int 10h ;
end;
end.
This routine works fine in a full-screen DOS-box under Windows. But when
I change to a windowed DOS-box, the cursor is visible again.
How can I prevent my cursor to be visoble in both a windowed and
full-screen DOS-box?
Alex
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads