mirror of
https://github.com/cc65/cc65.git
synced 2026-04-21 09:17:52 +00:00
Move constructor code into the INIT segment
git-svn-id: svn://svn.cc65.org/cc65/trunk@3405 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
+11
-6
@@ -7,7 +7,7 @@
|
||||
;
|
||||
|
||||
.export _cputcxy, _cputc, cputdirect, putchar
|
||||
.export newline
|
||||
.export newline
|
||||
.constructor conioinit
|
||||
.import popa, _gotoxy
|
||||
.import ppuinit, paletteinit, ppubuf_put
|
||||
@@ -18,12 +18,14 @@
|
||||
.include "nes.inc"
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
|
||||
.code
|
||||
|
||||
_cputcxy:
|
||||
pha ; Save C
|
||||
jsr popa ; Get Y
|
||||
pha ; Save C
|
||||
jsr popa ; Get Y
|
||||
jsr _gotoxy ; Set cursor, drop x
|
||||
pla ; Restore C
|
||||
pla ; Restore C
|
||||
|
||||
; Plot a character - also used as internal function
|
||||
|
||||
@@ -67,13 +69,16 @@ plot: ldy CURS_X
|
||||
; position in Y
|
||||
|
||||
putchar:
|
||||
ora RVS ; Set revers bit
|
||||
ora RVS ; Set revers bit
|
||||
ldy SCREEN_PTR+1
|
||||
ldx SCREEN_PTR
|
||||
jmp ppubuf_put
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Initialize the conio subsystem
|
||||
; Initialize the conio subsystem. Code goes into the INIT segment, which may
|
||||
; be reused after startup.
|
||||
|
||||
.segment "INIT"
|
||||
|
||||
conioinit:
|
||||
jsr ppuinit
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
|
||||
|
||||
;---------------------------------------------------------------------------
|
||||
; Setup arguments for main
|
||||
; Get possible command-line arguments. Goes into the special INIT segment,
|
||||
; which may be reused after the startup code is run
|
||||
|
||||
.segment "INIT"
|
||||
|
||||
.proc initmainargs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user