Serial driver for the SSC card by Oliver Schmidt

git-svn-id: svn://svn.cc65.org/cc65/trunk@3627 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2005-09-08 21:03:46 +00:00
parent 575ee044e5
commit 6ea5614493
5 changed files with 464 additions and 16 deletions

View File

@@ -41,9 +41,12 @@ _exit: ldx #<exit
lda #>exit
jsr reset ; Setup RESET vector
; Call module destructors
jsr donelib
; Check for valid interrupt vector table entry number
lda intnum
beq :+
beq exit
; Deallocate interrupt vector table entry
dec params ; Adjust parameter count
@@ -51,9 +54,6 @@ _exit: ldx #<exit
.byte $41 ; Dealloc interrupt
.addr params
; Call module destructors
: jsr donelib
; Restore the original RESET vector
exit: ldx #$02
: lda rvsave,x
@@ -111,9 +111,6 @@ init: ldx #zpspace-1
lda HIMEM+1
sta sp+1 ; Set argument stack ptr
; Call module constructors
jsr initlib
; Check for interruptors
lda #<__INTERRUPTOR_COUNT__
beq :+
@@ -129,8 +126,15 @@ init: ldx #zpspace-1
.addr params
bcs prterr
; Enable interrupts as old ProDOS versions (i.e. 1.1.1)
; jump to SYS and BIN programs with interrupts disabled
cli
; Call module constructors
: jsr initlib
; Push arguments and call main()
: jmp callmain
jmp callmain
; Print error message and return
prterr: ldx #msglen-1