From: izydorst Date: Fri, 7 Mar 2003 00:31:51 +0000 (+0000) Subject: cr/lf hell fixed X-Git-Tag: V2.12.0~1686 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d5d0d65cd63fcc3d82966039158c2c2c00d4c2ef;p=cc65 cr/lf hell fixed git-svn-id: svn://svn.cc65.org/cc65/trunk@2006 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/geos/conio/cputc.s b/libsrc/geos/conio/cputc.s index 5a9f306cc..50b657910 100644 --- a/libsrc/geos/conio/cputc.s +++ b/libsrc/geos/conio/cputc.s @@ -33,7 +33,7 @@ _cputc: cmp #$20 bcs L1 cmp #CR - beq echo_crlf + beq do_cr cmp #LF beq do_lf cmp #$1d @@ -72,16 +72,15 @@ L2: php inc cursor_c lda cursor_c - cmp xsize + cmp xsize ; hit right margin? bne update_cursor -echo_crlf: - lda #0 + lda #0 ; yes - do cr+lf sta cursor_c do_lf: inc cursor_r lda cursor_r - cmp ysize + cmp ysize ; hit bottom margin? bne update_cursor - dec cursor_r + dec cursor_r ; yes - stay in the last line update_cursor: jsr fixcursor @@ -96,3 +95,8 @@ update_cursor: lda #1 ; update cursor prompt position sta r3L jmp PosSprite + +do_cr: lda #0 + sta cursor_c + beq update_cursor +