Replies: 6 comments 14 replies
-
In quit_reset you configure the screen, and then set the processor port to enable IO at $DXXX. Wouldn't it be prudent to enable IO first, if this is intended to reset after any arbitrary program? If there's something I'm missing it could be worth a comment in the source! Here's the commit that added it, and another that removed basic rom from it, both very old. |
Beta Was this translation helpful? Give feedback.
-
Also in lda #$17
sta $dd00 ; $3 vic bank 0, ($14 clock a bit onto user port?)
sta $d018 ; $6 character rom, $10 screen 0 Do I understand the |
Beta Was this translation helpful? Give feedback.
-
In v.fs you scratch a file with the command "s0:filename\r". Is the '0' important? It doesn't seem to be mentioned in the 1541 manual. |
Beta Was this translation helpful? Give feedback.
-
I noticed in interpreter.asm the #$%101 .
5 ok I think this might fix it, plus make it very slightly smaller and faster: Click for diff.
diff --git a/asm/interpreter.asm b/asm/interpreter.asm
--- asm/interpreter.asm
+++ asm/interpreter.asm
@@ -584,17 +573,8 @@
jsr R_TO
jsr PLUS
jmp SWAP
-apply_base
- sta BASE
- dec .chars_to_process
- inc W3
- bne +
- inc W3+1
-+ lda (W3),y
- rts
-
; Z = success, NZ = fail
; success: ( caddr u -- number )
; fail: ( caddr u -- caddr u )
READ_NUMBER
@@ -619,25 +599,32 @@
lda (W3), y
cmp #"'"
beq .parse_char
- cmp #"#"
+ cmp #"$"
bne .check_decimal
- lda #10
- jsr apply_base
+ lda #16
+ bne .base_a
.check_decimal
- cmp #"$"
+ cmp #"#"
bne .check_binary
- lda #16
- jsr apply_base
+ lda #10
+ bne .base_a
.check_binary
cmp #"%"
bne .check_negate
lda #2
- jsr apply_base
+.base_a
+ sta BASE
+ dec .chars_to_process
+ inc W3
+ bne +
+ inc W3+1
++ lda (W3),y
+
.check_negate
cmp #"-"
bne .loop_entry
inc .negate Maybe the two I opted to check for |
Beta Was this translation helpful? Give feedback.
-
Lines 3 and 9 of accept.fs contain the phrase: In any case I took the liberty of rewriting accept, keeping the same behavior but shrinking the code from 210 to 147 bytes. It's a bit slower I guess but that's fine since it's a user input word. Here it is, let me know if you'd prefer I send a pull request: (code moved to PR) |
Beta Was this translation helpful? Give feedback.
-
”Was that intended to be $cc c@ >r ( ... ) r> $cc !, restoring the previous
cursor state?”
Probably :-) well spotted!
I would welcome a pull request, then it is easy to see the diff.
sön 14 maj 2023 kl. 23:02 skrev ekipan ***@***.***>:
… Lines 3 and 9 of accept.fs
<https://github.com/jkotlinski/durexforth/blob/e33627cf924816f408cf58bbd4a09afd61050f06/forth/accept.fs#L3-L9>
contain the phrase: $cc >r ( ... ) r> $cc !, which stores the value $cc
at $cc, effectively always turning off the cursor when accept is done.
Was that intended to be $cc c@ >r ( ... ) r> $cc !, restoring the
previous cursor state?
In any case I took the liberty of rewriting accept, keeping the same
behavior but shrinking the code from 210 to 147 bytes. It's a bit slower I
guess but that's fine since it's a user input word. Here it is, let me know
if you'd prefer I send a pull request:
0 value addr
: accept ( addr avail -- len )
swap to addr 0 ( avail len )0 $cc c! \ cursor onbegin key case
$d of \ cr
1 $cc c! nip space exit endof$14 of \ del
dup if 1- $14 emit then endof( avail len char ) \ add to buffer?
>r 2dup > r@ bl $7f within and if
r@ over addr + c! 1+ r@ emit then r>endcase again ;
hide addr
—
Reply to this email directly, view it on GitHub
<#538 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34O3WXCLQQDVZTPEBIVTXGFB7XANCNFSM6AAAAAAW6M2DCY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm reading durexForth and learning C64 as I go. (I moved the actual question to a comment, so that replies to it will thread there, and any further questions to their own comments as well.)
Beta Was this translation helpful? Give feedback.
All reactions