Skip to content

Commit

Permalink
initial romwbw extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitrit committed Jan 10, 2021
1 parent 20d868b commit 5c908c5
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 3 deletions.
13 changes: 10 additions & 3 deletions figforth.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TITLE Z80 fig-FORTH 1.3 a
.TITLE Z80 fig-FORTH 1.3
;
;
; Modified frm FIG document keyed by Dennis L. Wilson 800907
Expand Down Expand Up @@ -2805,7 +2805,7 @@ COLD: .WORD DOCOL
.WORD CLD2-$
.WORD PDOTQ
.BYTE 7
.TEXT "No file"
.TEXT "No File"
.WORD BYE
CLD2: .WORD ABORT
;
Expand Down Expand Up @@ -3227,10 +3227,17 @@ PTSTO: .WORD $+2
.EJECT
#INCLUDE CONPRTIO.ASM
.EJECT
#IFDEF ROMWBW
#INCLUDE ROMWBW.ASM
PREVNFA .EQU STIME-8
#ELSE
PREVNFA .EQU ARROW-6
#ENDIF
.EJECT
;
.BYTE 0C1H ; ' (tick)
.BYTE 0A7H
.WORD ARROW-6
.WORD PREVNFA
TICK: .WORD DOCOL
.WORD DFIND
.WORD ZEQU
Expand Down
58 changes: 58 additions & 0 deletions romwbw.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
; RomWBW extensions
;
; Last update:
;
; 200110 - initial version
;
;
; RomWBW FUNCTIONS
;
CIOIN .EQU 00H ; character input
CIOIST .EQU 02H ; character input status
;
RTCGETTIM .EQU 20H ; rtc get time
RTCSETTIM .EQU 21H ; rtc set time
;
;
#DEFINE HBIOS RST 08
;
;
;
TBUF .FILL 6,0
;
; ROMWBW LOW LEVEL ROUTINES
;
.BYTE 84H ; TIME ( -- addr )
.TEXT "TIM" ; Get the RTC time and leave the address of the
.BYTE 'E'+$80 ; 6 byte date/time buffer, YMDHMS. Each byte is
.WORD ARROW-6 ; BCD encoded.
TIME: .WORD $+2
EXX
PUSH BC
LD HL,TBUF
LD B,RTCGETTIM
HBIOS
POP BC
EXX
LD HL,TBUF
JHPUSH
;
.BYTE 85H ; STIME ( addr -- )
.TEXT "STIM" ; Set the RTC time. addr is the address of the
.BYTE 'E'+$80 ; 6 byte date/time buffer, YMDHMS. Each byte is
.WORD TIME-7 ; BCD encoded.
STIME .WORD $+2
EXX
POP HL
PUSH BC
LD B,RTCSETTIM
HBIOS
POP BC
EXX
JNEXT
;
; ROMWBW HIGH LEVEL ROUTINES
;

;
;

0 comments on commit 5c908c5

Please sign in to comment.