mirror of
https://github.com/cc65/cc65.git
synced 2024-12-28 22:30:12 +00:00
Merge branch 'master' of https://github.com/cc65/cc65
This commit is contained in:
commit
d2bc449598
@ -1,8 +1,7 @@
|
|||||||
;
|
;
|
||||||
; Vic20 generic definitions. Stolen mostly from c64.inc - Steve Schmidtke
|
; VIC-20 generic definitions. Stolen mostly from c64.inc -- Steve Schmidtke
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Zero page, Commodore stuff
|
; Zero page, Commodore stuff
|
||||||
|
|
||||||
@ -12,8 +11,8 @@ TXTPTR := $7A ; Pointer into BASIC source code
|
|||||||
STATUS := $90 ; Kernal I/O completion status
|
STATUS := $90 ; Kernal I/O completion status
|
||||||
TIME := $A0 ; 60HZ clock
|
TIME := $A0 ; 60HZ clock
|
||||||
FNAM_LEN := $B7 ; Length of filename
|
FNAM_LEN := $B7 ; Length of filename
|
||||||
SECADR := $B9 ; Secondary address
|
SECADR := $B9 ; Second address
|
||||||
DEVNUM := $BA ; Device number
|
DEVNUM := $BA ; Device number (first address)
|
||||||
FNAM := $BB ; Pointer to filename
|
FNAM := $BB ; Pointer to filename
|
||||||
KEY_COUNT := $C6 ; Number of keys in input buffer
|
KEY_COUNT := $C6 ; Number of keys in input buffer
|
||||||
RVS := $C7 ; Reverse flag
|
RVS := $C7 ; Reverse flag
|
||||||
@ -36,6 +35,8 @@ KBDREPEAT := $28a
|
|||||||
KBDREPEATRATE := $28b
|
KBDREPEATRATE := $28b
|
||||||
KBDREPEATDELAY := $28c
|
KBDREPEATDELAY := $28c
|
||||||
|
|
||||||
|
RSSTAT := $297 ; RS-232 device driver status
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Screen size
|
; Screen size
|
||||||
|
|
||||||
|
@ -142,13 +142,20 @@ The functions listed below are special for the CX16. See the <url
|
|||||||
url="funcref.html" name="function reference"> for declarations and usage.
|
url="funcref.html" name="function reference"> for declarations and usage.
|
||||||
|
|
||||||
<itemize>
|
<itemize>
|
||||||
<item>get_ostype
|
<item>get_ostype()
|
||||||
<item>set_tv
|
<item>set_tv()
|
||||||
<item>videomode
|
<item>videomode()
|
||||||
<item>vpeek
|
<item>vpeek()
|
||||||
<item>vpoke
|
<item>vpoke()
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
|
<tt/cpeekcolor()/ works differently on the Commander X16 than it does on other
|
||||||
|
platforms. Each character has two colors: background and text (foreground).
|
||||||
|
<tt/cpeekcolor()/ returns both colors. The high nybble describes the
|
||||||
|
background color, the low nybble describes the text color. For example, if the
|
||||||
|
function is used on the default screen, then it returns $61, which means
|
||||||
|
white-on-blue.
|
||||||
|
|
||||||
|
|
||||||
<sect1>CBM-specific functions<p>
|
<sect1>CBM-specific functions<p>
|
||||||
|
|
||||||
@ -157,32 +164,32 @@ machines. See the <url url="funcref.html" name="function reference"> for
|
|||||||
declarations and usage.
|
declarations and usage.
|
||||||
|
|
||||||
<itemize>
|
<itemize>
|
||||||
<item>cbm_close
|
<item>cbm_close()
|
||||||
<item>cbm_closedir
|
<item>cbm_closedir()
|
||||||
<item>cbm_k_basin
|
<item>cbm_k_basin()
|
||||||
<item>cbm_k_bsout
|
<item>cbm_k_bsout()
|
||||||
<item>cbm_k_chkin
|
<item>cbm_k_chkin()
|
||||||
<item>cbm_k_ckout
|
<item>cbm_k_ckout()
|
||||||
<item>cbm_k_close
|
<item>cbm_k_close()
|
||||||
<item>cbm_k_clrch
|
<item>cbm_k_clrch()
|
||||||
<item>cbm_k_getin
|
<item>cbm_k_getin()
|
||||||
<item>cbm_k_load
|
<item>cbm_k_load()
|
||||||
<item>cbm_k_open
|
<item>cbm_k_open()
|
||||||
<item>cbm_k_readst
|
<item>cbm_k_readst()
|
||||||
<item>cbm_k_save
|
<item>cbm_k_save()
|
||||||
<item>cbm_k_second
|
<item>cbm_k_second()
|
||||||
<item>cbm_k_setlfs
|
<item>cbm_k_setlfs()
|
||||||
<item>cbm_k_setnam
|
<item>cbm_k_setnam()
|
||||||
<item>cbm_k_tksa
|
<item>cbm_k_tksa()
|
||||||
<item>cbm_load
|
<item>cbm_load()
|
||||||
<item>cbm_open
|
<item>cbm_open()
|
||||||
<item>cbm_opendir
|
<item>cbm_opendir()
|
||||||
<item>cbm_read
|
<item>cbm_read()
|
||||||
<item>cbm_readdir
|
<item>cbm_readdir()
|
||||||
<item>cbm_save
|
<item>cbm_save()
|
||||||
<item>cbm_write
|
<item>cbm_write()
|
||||||
<item>get_tv
|
<item>get_tv()
|
||||||
<item>waitvsync
|
<item>waitvsync()
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
|
|
||||||
|
@ -2813,6 +2813,8 @@ location of the cursor in the display screen RAM. That number can be passed to
|
|||||||
done to make it obvious that peeking doesn't move the cursor in any way. Your
|
done to make it obvious that peeking doesn't move the cursor in any way. Your
|
||||||
program must place the cursor where it wants to peek before it calls any of
|
program must place the cursor where it wants to peek before it calls any of
|
||||||
those functions.
|
those functions.
|
||||||
|
<item>On the cx16 (Commander X16) target, this function returns two values: the
|
||||||
|
background color, in the high nybble, and the text color, in the low nybble.
|
||||||
</itemize>
|
</itemize>
|
||||||
<tag/Availability/cc65
|
<tag/Availability/cc65
|
||||||
<tag/See also/
|
<tag/See also/
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
;
|
;
|
||||||
; Ullrich von Bassewitz, 03.06.1999
|
; 1999-06-03, Ullrich von Bassewitz
|
||||||
|
; 2021-01-12, Greg King
|
||||||
;
|
;
|
||||||
; unsigned char cbm_k_readst (void);
|
; unsigned char cbm_k_readst (void);
|
||||||
;
|
;
|
||||||
@ -10,6 +11,5 @@
|
|||||||
|
|
||||||
|
|
||||||
_cbm_k_readst:
|
_cbm_k_readst:
|
||||||
jsr READST
|
ldx #>$0000
|
||||||
ldx #0 ; Clear high byte
|
jmp READST
|
||||||
rts
|
|
||||||
|
28
libsrc/vic20/c_readst.s
Normal file
28
libsrc/vic20/c_readst.s
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
;
|
||||||
|
; 1999-06-03, Ullrich von Bassewitz
|
||||||
|
; 2021-01-12, Greg King
|
||||||
|
;
|
||||||
|
; unsigned char cbm_k_readst (void);
|
||||||
|
;
|
||||||
|
; This version works around a bug in VIC-20 Kernal's READST function.
|
||||||
|
;
|
||||||
|
|
||||||
|
.include "vic20.inc"
|
||||||
|
.include "../cbm/cbm.inc"
|
||||||
|
|
||||||
|
.export _cbm_k_readst
|
||||||
|
|
||||||
|
|
||||||
|
_cbm_k_readst:
|
||||||
|
ldx #>$0000
|
||||||
|
lda DEVNUM
|
||||||
|
cmp #CBMDEV_RS232
|
||||||
|
beq @L1
|
||||||
|
|
||||||
|
jmp READST
|
||||||
|
|
||||||
|
; Work-around: Read the RS-232 status variable directly.
|
||||||
|
|
||||||
|
@L1: lda RSSTAT
|
||||||
|
stx RSSTAT ; reset the status bits
|
||||||
|
rts
|
Loading…
Reference in New Issue
Block a user