Hello Thomas!
Thursday February 01 1996 00:00, Thomas Gohel wrote to Pedro Jaramillo:
TG> -+- Cut
-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-
TG> ' demonstration for a little TSR-clock with PowerBASIC 3.0/3.2
TG> ' copyright by Thomas Gohel, GERMANY
TG> $COMPILE EXE "PBCLOCK.EXE"
TG> $OPTION CNTLBREAK OFF
TG> CLS
TG> TSRClock "ON" ' Clock on
TG> SHELL
TG> TSRClock "OFF" ' Clock off
TG> END
TG> SUB TSRClock(Action$) public
TG> SELECT CASE Action$
TG> CASE "ON", "EIN", "+"
TG> NewIntVektorSeg?? = CODESEG(Time)
TG> NewIntVektorOff?? = CODEPTR(Time)
TG> ! call GetOldInterruptVektor
TG> ! call SetNewInterruptVektor
TG> CASE "OFF", "AUS", "-"
TG> ! call SetOldInterruptVektor
TG> CASE ELSE
TG> PRINT "illegal function call!"
TG> END SELECT
TG> EXIT SUB
TG> Time:
TG> ! push ax
TG> ! push bx
TG> ! push cx
TG> ! push dx
TG> ! push si
TG> ! push di
TG> ! push bp
TG> ! push ds
TG> ! push es
TG> ! mov ax, &hb800 ;Set the Video-RAM
TG> ! mov es, ax
TG> ! mov bx, 142 ;Set the position
TG> ! mov al, &h04
TG> ! out &h70, al
TG> ! in al, &h71
TG> ! call WriteTime
TG> ! call WriteHyphen
TG> ! mov al, &h02
TG> ! out &h70, al
TG> ! in al, &h71
TG> ! call WriteTime
TG> ! call WriteHyphen
TG> ! mov al, &h00
TG> ! out &h70, al
TG> ! in al, &h71
TG> ! call WriteTime
TG> ! pop es
TG> ! pop ds
TG> ! pop bp
TG> ! pop di
TG> ! pop si
TG> ! pop dx
TG> ! pop cx
TG> ! pop bx
TG> ! pop ax
TG> ! jmp dword OldTimerProcedure ; jump old handler (incl. IRET)
TG> WriteTime:
TG> ! mov ah, al
TG> ! mov cl, 4
TG> ! shr ah, cl
TG> ! mov ch, ah
TG> ! shl ch, cl
TG> ! sub al, ch
TG> ! add ah, 48
TG> ! add al, 48
TG> ! mov cl, 11 ;set color
TG> ! mov es:[bx], ah
TG> ! inc bx
TG> ! mov es:[bx], cl
TG> ! inc bx
TG> ! mov es:[bx], al
TG> ! inc bx
TG> ! mov es:[bx], cl
TG> ! inc bx
TG> ! retn
TG> WriteHyphen:
TG> ! mov ah, 58
TG> ! mov es:[bx], ah
TG> ! inc bx
TG> ! mov es:[bx], cl
TG> ! inc bx
TG> ! retn
TG> SetNewInterruptVektor:
TG> ! push ds
TG> ! mov ah, &h25
TG> ! mov al, &h1C
TG> ! mov dx, NewIntVektorOff??
TG> ! mov ds, NewIntVektorSeg??
TG> ! int &h21
TG> ! pop ds
TG> ! retn
TG> SetOldInterruptVektor:
TG> ! push ds
TG> ! mov ah, &h25
TG> ! mov al, &h1C
TG> ! mov dx, OldTimerProcedure[00]
TG> ! mov ds, OldTimerProcedure[02]
TG> ! int &h21
TG> ! pop ds
TG> ! retn
TG> GetOldInterruptVektor:
TG> ! push ds
TG> ! mov ah, &h35
TG> ! mov al, &h1C
TG> ! int &h21
TG> ! pop ds
TG> ! mov OldTimerProcedure[02], es
TG> ! mov OldTimerProcedure[00], bx
TG> ! retn
TG> OldTimerProcedure: ' old Int1C-pointer
TG> ! dd 0
TG> END SUB
TG> -+- Cut End
-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---
Very interesting! . The problem is that I have PB2.1 and it doesn't support
inline Op-code but plain Hex-code only plus a few other limitations. Is there
a way for you to write the PB2.1 compatible code? As you can see this seems
to be a dead echo and the PB tech-Support guys are "NO WHERE" ever. At least
they don't care anymore about the old folks who bought their previous
releases.
Your friend,
Pedro Jaramillo
--- FMail/386 1.0g
:102/160)
---------------
* Origin: HISPANA NET, World Network of Computer Systems. (Hispana
|