Mercurial > hg > Members > kono > nitros9-code
changeset 3223:b1f1c72a8f79
Added some optimizations to co42.asm to save some space and cycles where possible.
author | David Ladd <drencor-xeen@users.sourceforge.net> |
---|---|
date | Sat, 20 Jan 2018 18:14:16 -0600 |
parents | c086a5d69b78 |
children | 343b7428ff23 |
files | level1/modules/co42.asm |
diffstat | 1 files changed, 24 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/level1/modules/co42.asm Wed Dec 20 23:28:18 2017 -0600 +++ b/level1/modules/co42.asm Sat Jan 20 18:14:16 2018 -0600 @@ -37,6 +37,14 @@ * 2017/04/23 Felipe Antoniosi * Create this driver as 42x24 column * +* 2018/01/20 David Ladd +* Moved Driver Entry Table closer to Term to allow fall through. +* This is to save bytes and cycles. Changed lbra Write to bra +* Write to save cyrcles each time characters are written to screen. +* Also changed lda and ldb to a ldd to save cycle(s) and space. +* Also a few other optimizations to code. +* + nam Co42 ttl Hi-Res 42x24 Graphics Console Output Subroutine for VTIO @@ -62,12 +70,6 @@ name fcs /Co42/ fcb edition -start lbra Init - lbra Write - lbra GetStat - lbra SetStat - lbra Term - Init pshs u,a ldd #ScreenSize+$100 * Request a screenful of ram + $100 bytes os9 F$SRqMem @@ -107,6 +109,12 @@ InitFlag fcb $00 +start lbra Init + bra Write + nop + lbra GetStat + lbra SetStat + Term pshs y,x pshs u * save U ldd #ScreenSize * Graphics memory size @@ -138,10 +146,9 @@ CheckForNormal cmpa #$20 - bcs DoCtrlChar * Control charater ? + blo DoCtrlChar * Control charater ? cmpa #$7F - bcc DoCtrlChar * or upper bit set - bra DoNormalChar + blo DoNormalChar DoCtrlChar leax >CtrlCharDispatch,pcr @@ -206,8 +213,8 @@ * lbsr DoDisplayCursor * Display cursor lbra WriteExit2 - clrb * Flag no error - rts * Return to caller +* clrb * Flag no error +* rts * Return to caller * * Draw the normal character $20..$7f, in the a register @@ -500,8 +507,9 @@ ora #$F0 sta $02,x ldx #$FFC0 - lda #$06 - ldb #$03 + ldd #$0603 +* lda #$06 +* ldb #$03 bsr L0305 lda V.51ScrnA,u lsra @@ -759,8 +767,9 @@ * $1b46 - reverse on * DoReverseOn - lda #$FF - coma + clra +* lda #$FF +* coma L046F sta V.51ReverseFlag,u lbra CancelEscSequence