{ ------------------ TIME.INC ---------------- Include-File fuer interruptgesteuerte Zeitanzeige auf dem JOYCE. 1987 M.A. procedure Clock_Init -> MCode initialisieren procedure Clock_XY() -> Anzeigekoordinaten procedure Clock_On -> Anzeige einschalten procedure Clock_Off -> Anzeige ausschalten procedure Set_Clock -> Uhr stellen function TimeString -> Uhrzeit als String Wegen MCode Compilerendadresse < F500 halten und Run_Modus vermeiden!!! ------------------------------------------------ } type Strg_8 = string[8]; procedure Clock_On; external $F500; procedure Clock_Off; external $F50F; procedure Clock_Init; type MCode = array[0..168] of byte; const MProg:MCode = ($F3,$2A,$A7,$FE,$22,$A9,$F5,$21,$18,$F5,$22,$A7,$FE,$FB,$C9,$F3, $2A,$A9,$F5,$22,$A7,$FE,$FB,$C9,$F3,$F5,$C5,$D5,$E5,$DD,$E5,$21, $AB,$F5,$34,$C2,$3F,$F5,$DB,$F1,$67,$DB,$F2,$6F,$E5,$3E,$81,$D3, $F1,$3E,$82,$D3,$F2,$CD,$48,$F5,$E1,$7D,$D3,$F2,$7C,$D3,$F1,$DD, $E1,$E1,$D1,$C1,$F1,$C3,$40,$1E,$21,$AC,$F5,$11,$F6,$FB,$06,$03, $1A,$1F,$1F,$1F,$1F,$E6,$0F,$C6,$30,$77,$23,$1A,$E6,$0F,$C6,$30, $77,$23,$3E,$3A,$77,$23,$13,$10,$E7,$06,$08,$1E,$50,$16,$00,$DD, $21,$AC,$F5,$C5,$D5,$D5,$DD,$7E,$00,$6F,$26,$00,$29,$29,$29,$11, $00,$B8,$19,$DD,$23,$D1,$E5,$7A,$16,$00,$07,$17,$17,$17,$6F,$7A, $CE,$B6,$67,$7E,$23,$66,$6F,$EB,$29,$29,$19,$29,$EB,$E1,$01,$08, $00,$ED,$B0,$D1,$C1,$1C,$10,$CB,$C9); var Data : MCode absolute $F500; begin Data:=MProg; end; procedure Clock_XY (x,y: byte); var CX : byte absolute $F56C; CY : byte absolute $F56E; begin CX:=x; CY:=y; end; function BCD (var c_byt:byte):byte; var a,b : integer; begin a:=c_byt div 10; b:=c_byt mod 10; c_byt:=a*16+b; BCD:=c_byt; end; procedure Set_Clock (h,m: byte); var table : string[4]; begin table:=chr(1)+chr(1)+chr(BCD(h))+chr(BCD(m)); bdos (104,Addr(table)+1); end; function TimeString : Strg_8; var i : integer; t : string[8]; const start = $F5AC; begin t:=''; for i:=0 to 7 do t:=t+chr(mem[start+i]); TimeString:=t; end; { -------- Ende von TIME.INC ----------- }