Merge remote-tracking branch 'upstream/master' into pcenginetarget
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
;
|
||||
; Oliver Schmidt, 2012-01-18
|
||||
; 2012-01-18, Oliver Schmidt
|
||||
; 2015-08-22, Greg King
|
||||
;
|
||||
; void __fastcall__ set_irq (irq_handler f, void *stack_addr, size_t stack_size);
|
||||
; void reset_irq (void);
|
||||
@@ -7,8 +8,7 @@
|
||||
|
||||
.export _set_irq, _reset_irq
|
||||
.interruptor clevel_irq, 1 ; Export as low priority IRQ handler
|
||||
.import popax
|
||||
.importzp __ZP_START__
|
||||
.import popax, __ZP_START__
|
||||
|
||||
.include "zeropage.inc"
|
||||
|
||||
@@ -31,6 +31,8 @@ zpsave: .res zpsavespace
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
.code
|
||||
|
||||
.proc _set_irq
|
||||
|
||||
; Keep clevel_irq from being called right now
|
||||
@@ -77,7 +79,7 @@ zpsave: .res zpsavespace
|
||||
|
||||
; Save our zero page locations
|
||||
@L1: ldx #.sizeof(::zpsave)-1
|
||||
@L2: lda __ZP_START__,x
|
||||
@L2: lda <__ZP_START__,x
|
||||
sta zpsave,x
|
||||
dex
|
||||
bpl @L2
|
||||
@@ -94,7 +96,7 @@ zpsave: .res zpsavespace
|
||||
; Copy back our zero page content
|
||||
ldx #.sizeof(::zpsave)-1
|
||||
@L3: ldy zpsave,x
|
||||
sty __ZP_START__,x
|
||||
sty <__ZP_START__,x
|
||||
dex
|
||||
bpl @L3
|
||||
|
||||
@@ -103,4 +105,3 @@ zpsave: .res zpsavespace
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;
|
||||
; int vcprintf (const char* Format, va_list ap);
|
||||
; int __fastcall__ vcprintf (const char* Format, va_list ap);
|
||||
;
|
||||
; Ullrich von Bassewitz, 2.12.2000
|
||||
;
|
||||
@@ -30,7 +30,7 @@ outdesc: ; Static outdesc structure
|
||||
; ----------------------------------------------------------------------------
|
||||
; Callback routine used for the actual output.
|
||||
;
|
||||
; static void out (struct outdesc* d, const char* buf, unsigned count)
|
||||
; static void __cdecl__ out (struct outdesc* d, const char* buf, unsigned count)
|
||||
; /* Routine used for writing */
|
||||
; {
|
||||
; /* Fast screen output */
|
||||
@@ -94,7 +94,7 @@ out: jsr popax ; count
|
||||
; ----------------------------------------------------------------------------
|
||||
; vcprintf - formatted console i/o
|
||||
;
|
||||
; int vcprintf (const char* format, va_list ap)
|
||||
; int __fastcall__ vcprintf (const char* format, va_list ap)
|
||||
; {
|
||||
; struct outdesc d;
|
||||
;
|
||||
@@ -107,10 +107,6 @@ out: jsr popax ; count
|
||||
; /* Return bytes written */
|
||||
; return d.ccount;
|
||||
; }
|
||||
;
|
||||
; It is intentional that this function does not have __fastcall__ calling
|
||||
; conventions - we need the space on the stack anyway, so there's nothing
|
||||
; gained by using __fastcall__.
|
||||
|
||||
_vcprintf:
|
||||
sta ptr1 ; Save ap
|
||||
@@ -153,6 +149,3 @@ _vcprintf:
|
||||
lda outdesc ; ccount
|
||||
ldx outdesc+1
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ L1: jsr _cgetc
|
||||
|
||||
|
||||
; ----------------------------------------------------------------------------
|
||||
; static int unget(int c) {
|
||||
; static int cdecl unget(int c) {
|
||||
; pushed = true;
|
||||
; return back = c;
|
||||
; }
|
||||
@@ -127,4 +127,3 @@ d: .addr get ; SCANFDATA::GET
|
||||
pla
|
||||
jmp __scanf
|
||||
.endproc
|
||||
|
||||
|
||||
19
libsrc/nes/irq.s
Normal file
19
libsrc/nes/irq.s
Normal file
@@ -0,0 +1,19 @@
|
||||
;
|
||||
; IRQ handling (NES version)
|
||||
;
|
||||
|
||||
.export initirq, doneirq
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
|
||||
initirq:
|
||||
rts
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.code
|
||||
|
||||
doneirq:
|
||||
rts
|
||||
Reference in New Issue
Block a user