6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 01, 2024 12:26 pm

All times are UTC




Post new topic Reply to topic  [ 52 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
PostPosted: Wed Sep 05, 2012 3:57 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
dclxvi wrote:
It appears to be OCR'd as there are some instances of things like uppercase Os that should be zeros, and lowercase Ls that should be ones.

A clean version of the Forth source for the assembler is here. :D

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 22, 2013 5:35 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 904
Somewhat related to the stack underflow issue mentioned before... On my system, underflowing the stack with a . results in the following output:
Attachment:
forthcrash.png
forthcrash.png [ 10.5 KiB | Viewed 1977 times ]

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Last edited by enso on Wed Jul 24, 2013 6:41 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 24, 2013 6:41 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 904
Another weirdness: I can't edit the line being typed. Backspacing looks right, but the interpreter complains. For instance if I type in
10 SPADES and back up to correct it to say 10 SPACES, I get an error. Is that normal behavior or is it something to do with my terminal sending wrong backspace characters?

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 24, 2013 7:40 pm 
Offline

Joined: Sun Apr 10, 2011 8:29 am
Posts: 597
Location: Norway/Japan
It does sound like the old backspace vs. delete character problem.. it used to be such a hassle when using terminals on older Unix systems.

-Tor


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 24, 2013 11:47 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
The characters for backspace and enter are actually "hard coded" in the EXPECT routine.

Code:
L1729     .BYTE $86,'EXPEC',$D4
          .WORD L1701    ; link to ."
EXPEC     .WORD DOCOL
          .WORD OVER
          .WORD PLUS
          .WORD OVER
          .WORD PDO
L1736     .WORD KEY
          .WORD DUP
          .WORD CLIT
          .BYTE $E
          .WORD PORIG
          .WORD AT
          .WORD EQUAL
          .WORD ZBRAN
L1744     .WORD $1F       ; L1760-L1744
          .WORD DROP
          .WORD CLIT
          .BYTE 08        ;; <<-- Backspace character
          .WORD OVER
          .WORD I
          .WORD EQUAL
          .WORD DUP
          .WORD RFROM
          .WORD TWO
          .WORD SUB
          .WORD PLUS
          .WORD TOR
          .WORD SUB
          .WORD BRAN
L1759     .WORD $27       ; L1779-L1759
L1760     .WORD DUP
          .WORD CLIT
          .BYTE $0A       ;; <<--- Newline character to end a line.
          .WORD EQUAL
          .WORD ZBRAN
L1765     .WORD $0E       ; L1772-L1765
          .WORD LEAVE
          .WORD DROP
          .WORD BL
          .WORD ZERO
          .WORD BRAN
L1771     .WORD 04        ; L1773-L1771
L1772     .WORD DUP
L1773     .WORD I
          .WORD CSTOR
          .WORD ZERO
          .WORD I
          .WORD ONEP
          .WORD STORE
L1779     .WORD EMIT
          .WORD PLOOP
L1781     .WORD $FFA9
          .WORD DROP      ; L1736-L1781
          .WORD SEMIS


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 24, 2013 11:50 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 904
My terminal sends $08 as backspace; FIG-Forth defined it as $7F with a DW at the top... I don't know what words use it, but changing it fixed the problem.

Curious about the EXPECT $08...

I have to figure out the underflow next.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 25, 2013 3:44 am 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
Well, that was my Fig listing, I know I changed to the $0A for end of line due to how my simulator works, being I'm on a Mac. The $08 may have well been a $7F originally as well.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 52 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: