mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
add clock for Telestrat target and add some Telemon primitives
This commit is contained in:
parent
4f26650228
commit
c0d638a26d
@ -63,7 +63,7 @@ PTR_READ_DEST := $2C ; Used for XFREAD and XWRITE only in TELEMON 3.
|
||||
|
||||
ADCLK := $40 ; Address for clock display
|
||||
TIMEUS := $42
|
||||
TIMEUD := $44
|
||||
TIMEUD := $44 ; Counter clock (1/10 of a second)
|
||||
|
||||
|
||||
HRSX := $46
|
||||
@ -277,6 +277,7 @@ XRECLK = $3C ; Reset clock
|
||||
XCLCL = $3D ; Close clock
|
||||
XWRCLK = $3E ; Displays clock in the adress in A & Y registers
|
||||
|
||||
; Sound primitives
|
||||
XSONPS = $40 ; Send data to PSG register (14 values)
|
||||
XOUPS = $42 ; Send Oups sound into PSG
|
||||
XPLAY = $43 ; Play a sound
|
||||
@ -284,12 +285,25 @@ XSOUND = $44
|
||||
XMUSIC = $45
|
||||
XZAP = $46 ; Send Zap sound to PSG
|
||||
XSHOOT = $47
|
||||
|
||||
; Path Management
|
||||
XGETCWD = $48 ; Get current CWD
|
||||
XPUTCWD = $49 ; Chdir
|
||||
|
||||
; File management
|
||||
XMKDIR = $4B ; Create a folder. Only available in TELEMON 3.x (bank 7 of Orix)
|
||||
|
||||
XHCHRS = $4C ; Hard copy hires
|
||||
|
||||
; File management
|
||||
XRM = $4D ; Remove a folder or a file. Only available in TELEMON 3.x (bank 7 of Orix)
|
||||
|
||||
XFWR = $4E ; Put a char on the first screen. Only available in TELEMON 3.x (bank 7 of Orix)
|
||||
XGOKBD = $52
|
||||
|
||||
; Keyboard primitives
|
||||
XALLKB = $50 ; Read Keyboard, and populate KBDCOL
|
||||
XKBDAS = $51 ; Ascii conversion
|
||||
XGOKBD = $52 ; Swap keyboard type (Qwerty, French ...)
|
||||
|
||||
; Buffer management
|
||||
XECRBU = $54 ; Write A or AY in the buffer
|
||||
@ -301,8 +315,27 @@ XDEFBU = $59 ; Reset all value of the buffer
|
||||
XBUSY = $5A ; Test if the buffer is empty
|
||||
|
||||
XMALLOC = $5B ; Only in TELEMON 3.x (bank 7 of Orix)
|
||||
|
||||
; RS232 primitives
|
||||
XSDUMP = $5C ; RS232 input dump
|
||||
XCONSO = $5D ; Swap screen into RS232 terminal
|
||||
XSLOAD = $5E ; Read a file from RS232
|
||||
XSSAVE = $5F ; Write a file to RS232
|
||||
|
||||
; Minitel primitives
|
||||
XMLOAD = $60 ; Read a file from Minitel
|
||||
XMSAVE = $61 ; Write a file to Minitel
|
||||
|
||||
XFREE = $62 ; Only in TELEMON 3.x (bank 7 of Orix)
|
||||
|
||||
; Next Minitel primitives
|
||||
XWCXFI = $63 ; Wait connection
|
||||
XLIGNE = $64 ;
|
||||
XDECON = $65 ; Minitel disconnection
|
||||
XMOUT = $66 ; Send a byte to minitel (from A)
|
||||
|
||||
XSOUT = $67 ; Send accumulator value (A) to RS232, available in TELEMON 2.4 & 3.x : if RS232 buffer is full, the Oric Telestrat freezes
|
||||
|
||||
XHRSSE = $8C ; Set hires position cursor
|
||||
XDRAWA = $8D ; Draw a line absolute
|
||||
XDRAWR = $8E ; Draw a line (relative)
|
||||
@ -339,7 +372,7 @@ FLGTEL := $20D
|
||||
KOROM := $20E ; Used to compute the size of all rom bank. The result is store here. The value is in KB
|
||||
KORAM := $20F ; Used to compute the size of all ram bank. The result is store here. The value is in KB
|
||||
; Time management
|
||||
TIMED := $210
|
||||
TIMED := $210 ; Clock (1/10 of seconds)
|
||||
TIMES := $211
|
||||
TIMEM := $212
|
||||
TIMEH := $213
|
||||
|
30
libsrc/telestrat/clock.s
Normal file
30
libsrc/telestrat/clock.s
Normal file
@ -0,0 +1,30 @@
|
||||
;
|
||||
; Jede, 2021-03-10
|
||||
;
|
||||
; clock_t clock (void);
|
||||
;
|
||||
|
||||
.export _clock
|
||||
.importzp sreg
|
||||
|
||||
.include "telestrat.inc"
|
||||
|
||||
.proc _clock
|
||||
|
||||
; Clear the timer high 16 bits
|
||||
|
||||
ldy #$00
|
||||
sty sreg
|
||||
sty sreg+1
|
||||
|
||||
; Read the timer
|
||||
|
||||
sei ; Disable interrupts
|
||||
lda TIMEUD ; TIMED contains 1/10 of a second from clock. Telestrat main cardridge simulate a clock from VIA6522 timer
|
||||
ldx TIMEUD+1
|
||||
cli ; Reenable interrupts
|
||||
|
||||
rts
|
||||
.endproc
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user