Merge branch 'master' into kbrepeat
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
.export _cputcxy, _cputc, cputdirect, putchar
|
||||
.export newline, plot
|
||||
.import popa, _gotoxy
|
||||
.import gotoxy
|
||||
.import PLOT
|
||||
|
||||
.include "vic20.inc"
|
||||
@@ -15,8 +15,7 @@
|
||||
|
||||
_cputcxy:
|
||||
pha ; Save C
|
||||
jsr popa ; Get Y
|
||||
jsr _gotoxy ; Set cursor, drop x
|
||||
jsr gotoxy ; Set cursor, drop x and y
|
||||
pla ; Restore C
|
||||
|
||||
; Plot a character - also used as internal function
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
.import zerobss, push0
|
||||
.import callmain
|
||||
.import RESTOR, BSOUT, CLRCH
|
||||
.import __RAM_START__, __RAM_SIZE__ ; Linker generated
|
||||
.import __MAIN_START__, __MAIN_SIZE__ ; Linker generated
|
||||
.import __STACKSIZE__ ; Linker generated
|
||||
.importzp ST
|
||||
|
||||
@@ -44,10 +44,10 @@ L1: lda sp,x
|
||||
tsx
|
||||
stx spsave ; Save the system stack ptr
|
||||
|
||||
lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
|
||||
lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
|
||||
ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
|
||||
sta sp
|
||||
lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
|
||||
sta sp+1 ; Set argument stack ptr
|
||||
stx sp+1 ; Set argument stack ptr
|
||||
|
||||
; Call the module constructors.
|
||||
|
||||
@@ -86,7 +86,7 @@ L2: lda zpsave,x
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
zpsave: .res zpspace
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initirq:
|
||||
lda IRQVec
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
;-----------------------------------------------------------------------------
|
||||
; All functions are available in the kernal jump table
|
||||
|
||||
CINT = $FF81
|
||||
IOINIT = $FF84
|
||||
RAMTAS = $FF87
|
||||
CINT = $E518 ; No entries are in the kernal jump table of the Vic20 for these three (3) functions.
|
||||
IOINIT = $FDF9 ; The entries for these functions have been set to point directly to the functions
|
||||
RAMTAS = $FD8D ; in the kernal to maintain compatibility with the other Commodore platforms.
|
||||
RESTOR = $FF8A
|
||||
VECTOR = $FF8D
|
||||
SETMSG = $FF90
|
||||
|
||||
@@ -32,10 +32,10 @@ MAXARGS = 10 ; Maximum number of arguments allowed
|
||||
REM = $8f ; BASIC token-code
|
||||
NAME_LEN = 16 ; Maximum length of command-name
|
||||
|
||||
; Get possible command-line arguments. Goes into the special INIT segment,
|
||||
; Get possible command-line arguments. Goes into the special ONCE segment,
|
||||
; which may be reused after the startup code is run
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmainargs:
|
||||
|
||||
@@ -125,7 +125,7 @@ done: lda #<argv
|
||||
stx __argv + 1
|
||||
rts
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
term: .res 1
|
||||
name: .res NAME_LEN + 1
|
||||
|
||||
16
libsrc/vic20/waitvsync.s
Normal file
16
libsrc/vic20/waitvsync.s
Normal file
@@ -0,0 +1,16 @@
|
||||
;
|
||||
; Written by Groepaz <groepaz@gmx.net>
|
||||
;
|
||||
; void waitvsync (void);
|
||||
;
|
||||
|
||||
.export _waitvsync
|
||||
|
||||
.include "vic20.inc"
|
||||
|
||||
_waitvsync:
|
||||
@l2:
|
||||
lda VIC_HLINE
|
||||
bne @l2
|
||||
rts
|
||||
|
||||
Reference in New Issue
Block a user