From: Stephan Mühlstrasser Date: Wed, 18 Feb 2015 17:38:42 +0000 (+0100) Subject: Incorporated another round of feedback for pull request. X-Git-Tag: V2.15~22^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=92e75e9df81bde3830b3fc777490177a6c7f1709;p=cc65 Incorporated another round of feedback for pull request. Adjusted comment formatting in several assembler files. Removed dummy kbhit() function, as it's better to get a linker error than an implementation that does the wrong thing. --- diff --git a/doc/osi.sgml b/doc/osi.sgml index 514ef622e..ce2ee4836 100644 --- a/doc/osi.sgml +++ b/doc/osi.sgml @@ -139,8 +139,7 @@ There are no loadable drivers available. conio implementation

-The conio implementation is complete except for a working kbhit() function. -kbhit() currently returns true unconditionally. +The conio implementation is complete except for a kbhit() function. stdio implementation

diff --git a/libsrc/osic1p/chline.s b/libsrc/osic1p/chline.s index da07e83be..be40d40af 100644 --- a/libsrc/osic1p/chline.s +++ b/libsrc/osic1p/chline.s @@ -22,7 +22,7 @@ _chline: cmp #0 ; Is the length zero? beq L9 ; Jump if done sta tmp1 -L1: lda #$94 ; Horizontal line, screen code +L1: lda #$94 ; Horizontal line, screen code jsr cputdirect ; Direct output dec tmp1 bne L1 diff --git a/libsrc/osic1p/clrscr.s b/libsrc/osic1p/clrscr.s index d2346659b..ee32bf969 100644 --- a/libsrc/osic1p/clrscr.s +++ b/libsrc/osic1p/clrscr.s @@ -12,7 +12,7 @@ BANKS = VIDEORAMSIZE / $100 _clrscr: - lda #$20 ;' ' + lda #$20 ; ' ' ldy #BANKS ldx #$00 staloc: @@ -22,10 +22,10 @@ staloc: inc staloc+2 dey bne staloc - lda #>(SCRNBASE); load high byte - sta staloc+2 ; restore base address + lda #>(SCRNBASE) ; Load high byte + sta staloc+2 ; Restore base address - lda #$00 ; cursor in upper left corner + lda #$00 ; Cursor in upper left corner sta CURS_X sta CURS_Y - jmp plot ; Set the cursor position + jmp plot ; Set the cursor position diff --git a/libsrc/osic1p/crt0.s b/libsrc/osic1p/crt0.s index 07bdc3689..657ee2743 100644 --- a/libsrc/osic1p/crt0.s +++ b/libsrc/osic1p/crt0.s @@ -7,8 +7,8 @@ .export _init, _exit .import _main -.export __STARTUP__ : absolute = 1 ; Mark as startup -.import __RAM_START__, __RAM_SIZE__ ; Linker generated +.export __STARTUP__ : absolute = 1 ; Mark as startup +.import __RAM_START__, __RAM_SIZE__ ; Linker generated .import zerobss, initlib, donelib @@ -24,9 +24,9 @@ ; --------------------------------------------------------------------------- ; A little light 6502 housekeeping -_init: ldx #$FF ; Initialize stack pointer to $01FF +_init: ldx #$FF ; Initialize stack pointer to $01FF txs - cld ; Clear decimal mode + cld ; Clear decimal mode ; --------------------------------------------------------------------------- ; Set cc65 argument stack pointer @@ -39,8 +39,8 @@ _init: ldx #$FF ; Initialize stack pointer to $01FF ; --------------------------------------------------------------------------- ; Initialize memory storage - jsr zerobss ; Clear BSS segment - jsr initlib ; Run constructors + jsr zerobss ; Clear BSS segment + jsr initlib ; Run constructors ; --------------------------------------------------------------------------- ; Call main() @@ -48,7 +48,7 @@ _init: ldx #$FF ; Initialize stack pointer to $01FF jsr _main ; --------------------------------------------------------------------------- -; Back from main (this is also the _exit entry): force a software break +; Back from main (this is also the _exit entry): -_exit: jsr donelib ; Run destructors - jmp RESET ; Display boot menu after program exit +_exit: jsr donelib ; Run destructors + jmp RESET ; Display boot menu after program exit diff --git a/libsrc/osic1p/cvline.s b/libsrc/osic1p/cvline.s index c485918ee..84e5a45bf 100644 --- a/libsrc/osic1p/cvline.s +++ b/libsrc/osic1p/cvline.s @@ -21,7 +21,7 @@ _cvline: cmp #0 ; Is the length zero? beq L9 ; Jump if done sta tmp1 -L1: lda #$95 ; Vertical bar +L1: lda #$95 ; Vertical bar jsr putchar ; Write, no cursor advance jsr newline ; Advance cursor to next line dec tmp1 diff --git a/libsrc/osic1p/kbhit.s b/libsrc/osic1p/kbhit.s deleted file mode 100644 index 42db7a5e6..000000000 --- a/libsrc/osic1p/kbhit.s +++ /dev/null @@ -1,11 +0,0 @@ -; -; int kbhit (void); -; -; Currently a dummy function that returns always true - - .export _kbhit - -_kbhit: - lda #$01 ; load low byte with true value - ldx #$00 ; load high byte - rts diff --git a/libsrc/osic1p/osic1p.inc b/libsrc/osic1p/osic1p.inc index 58d63632f..9a0c346b6 100644 --- a/libsrc/osic1p/osic1p.inc +++ b/libsrc/osic1p/osic1p.inc @@ -1,9 +1,9 @@ ; Addresses -SCRNBASE := $D000 ; Base of video RAM -INPUTC := $FD00 ; Input character from keyboard -RESET := $FF00 ; Reset address, show boot prompt +SCRNBASE := $D000 ; Base of video RAM +INPUTC := $FD00 ; Input character from keyboard +RESET := $FF00 ; Reset address, show boot prompt ; Other definitions -VIDEORAMSIZE = $0400 ; Size of C1P video RAM (1 kB) -SCR_LINELEN = $18 ; screen width - 1 -SCR_HEIGHT = $18 ; screen height - 1 +VIDEORAMSIZE = $0400 ; Size of C1P video RAM (1 kB) +SCR_LINELEN = $18 ; screen width - 1 +SCR_HEIGHT = $18 ; screen height - 1