Trsek Commander - Substitute of Norton Commander, pascal
Delphi & Pascal (česká wiki)
Category: Source in Pascal
Program: Tc.pas
File exe: Tc.exe
need: Main.pas, Mouse.pas, T_wind.pas
Program: Tc.pas
File exe: Tc.exe
need: Main.pas, Mouse.pas, T_wind.pas
The purpose of this program is to substitute Norton Commander. It has had a great beginning and this program is a result. However, as it is with other similar projects, this one couldn't move at one point. At present it is possible to view the files in the window which can be enlarged or moved voluntarily by a mouse.
{ MOUSE.PAS Copyright (c) TrSek alias Zdeno Sekerak } { Cast kodu ktora sa prilinkuje k programu Tc.pas } { } { Datum:28.07.1996 http://www.trsek.com } { zisti co stlacil na myske } procedure get_mouse(var x,y,but:byte); var Reg:registers; begin Reg.AX:=$0003; Intr($33,Reg); x:=Reg.CX shr 3 +1; y:=Reg.DX shr 3 +1; but:=Reg.BX; end; { nastavi suradnice na myske } procedure set_mouse(x,y:byte); var Reg:registers; begin Reg.AX:=$0004; Reg.CX:=x*8; Reg.DX:=y*8; Intr($33,Reg); end; { zviditelni/vypne zobrazenie mysky Pastekovej } procedure show_mouse(show:boolean); var Reg:registers; begin if show then Reg.AX:=$0001 else Reg.AX:=$0002; Intr($33,Reg); end; { zisti je myska, nieje } function mouse_ok:boolean; var Reg:registers; begin Reg.AX:=$0000; Intr($33,reg); if Reg.AX=$0000 then mouse_ok:=false else begin mouse_ok:=true; Reg.AX:=$0001; Intr($33,Reg); end; end; { 0 -inicializuje mys a zisti kolko ma tlacidiel 1 -zobrazi 2 -zrusi zobrazenie 3 -cita poziciu a stav tlacidiel 4 -nastavi poziciu 5 -vracia suradnicu stavu tlacidla 6 -vracia suradnicu kde si tlacidlo pustil 7 -vymedzi interval suradnic poohybu 8 -ako 7 ale vertikalne 9 -graficky kurzor 10 -textovy kurzor 11 -cita nastavenie kroku citaca mysy 12 -definuje uzivatelsku rutinu pre mys 13,14 -zap/vyp emulace svetelneho pera 15 -nastavenie kroku mysy }