Skip to content

Commit 97115c8

Browse files
Buffered text now printing long lines without spaces correctly
1 parent 3712684 commit 97115c8

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DEBUGFLAGS = -DDEBUG=1
1+
#DEBUGFLAGS = -DDEBUG=1
22
#VMFLAGS = -DUSEVM=1
33
C1541 := /usr/bin/c1541
44
#X64 := /usr/bin/x64
@@ -8,12 +8,12 @@ X64 := /usr/bin/x64 -warp -autostart-delay-random
88
#all: dragon
99
#all: minform
1010
#all: czechz3
11-
#all: czechz5
11+
all: czechz5
1212
#all: strictz3
1313
#all: strictz5
1414
#all: etude
1515
#all: praxix
16-
all: oztestz3
16+
#all: oztestz3
1717

1818
d64.czechz3:
1919
acme -DZ3=1 $(DEBUGFLAGS) $(VMFLAGS) --cpu 6510 --format cbm -l acme_labels.txt --outfile ozmoo ozmoo.asm

screen.asm

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ printchar_buffered
181181
cmp #$20
182182
beq .printchar_done
183183
.not_first_space
184-
; add this char in the buffer
184+
; add this char to the buffer
185185
cmp #$0d
186186
bne .check_space
187187
; newline. Print line and reset the buffer
@@ -197,6 +197,14 @@ printchar_buffered
197197
ldy .buffer_index
198198
sty .buffer_last_space
199199
.not_space
200+
cmp #46 ; .
201+
bne .add_char
202+
; use period as separator of last resort if no space found
203+
sty .buffer_last_space
204+
bne .add_char
205+
ldy .buffer_index
206+
sty .buffer_last_space
207+
.add_char
200208
ldy .buffer_index
201209
sta .buffer,y
202210
inc .buffer_index

0 commit comments

Comments
 (0)