Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-01

Cursor-Procedures in Assembler

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andreas Kasparek aka Alamais aka Kaspi

Hola!

Little Question:
Can someone translate me these TP procedures to run with FreePascal? I don't really know anything about Assembler... Thanx alot!

Procedure CursorOff; ASSEMBLER;
asm
MOV AH, 03h
MOV BH, 00h
INT 10h
OR CH, 20h
MOV AH, 01h
INT 10h
end; { CursorOff }

Procedure CursorOn; ASSEMBLER;
asm
MOV AH, 03h
MOV BH, 00h
INT 10h
AND CH, 0DFh
MOV AH, 01h
INT 10h
end; { CursorOn }

Hasta lügo
Kaspi

Florian Klaempfl
to Andreas Kasparek aka Alamais aka Kaspi
you wrote 5 lines
Hola! Little Question: Can someone translate me these TP procedures to run with FreePascal? I don't really know anything about Assembler... Thanx alot!

Maybe you should have a look at the docs of the crt unit. The crt unit contains excatly these procedures so you don't need to translate them.

Procedure CursorOff; ASSEMBLER;

...

Procedure CursorOn; ASSEMBLER;

...

Ralf Quint
to Florian Klaempfl
you wrote 20 lines
At 23:31 17.01.01 +0100, you wrote: >Hola! > >Little Question: >Can someone translate me these TP procedures to run with FreePascal? I >don't really know anything about Assembler... Thanx alot! Maybe you should have a look at the docs of the crt unit. The crt unit contains excatly these procedures so you don't need to translate them. >Procedure CursorOff; ASSEMBLER; ... >Procedure CursorOn; ASSEMBLER; ...

Sorry, Florian, but you are mistaken here. The routines in your CRT unit (i just check the GO32V2 one) are NOT exactly what i had posted. The routines you have in the RTL are changing the look of the cursor to make them invisible and to "recreate" the cursor display. The routines that i have posted are turning the cursor off and back on to the original state! This is quite a difference. Maybe you should adapt the RTL routines to what i had posted ;-)))

Ralf