Search found 23 matches

by pjeaton
Wed Feb 07, 2024 11:30 am
Forum: General Discussions
Topic: Dark mode for forum.6502.org
Replies: 17
Views: 15438

Re: Dark mode for forum.6502.org

FWIW, as well as using Dark Reader on PC Microsoft Edge browser, I use Microsoft Edge browser on Android also and it has a built in dark mode setting you can enable, which works great, there's literally only been 1 or 2 minor websites where I've had to disable dark mode. It also has an add blocker ...
by pjeaton
Sat Oct 01, 2022 6:29 pm
Forum: Forth
Topic: Not your run of the mill control flow
Replies: 64
Views: 70030

Re: Not your run of the mill control flow

!if is probably what I'd go with, regardless of the clash with regular !

We used ! to mean NOT at university 30+ years ago, I use it in code, variables, comments...
by pjeaton
Mon Sep 06, 2021 8:17 pm
Forum: Newbies
Topic: What UART should i use for my first computer?
Replies: 27
Views: 6487

Re: What UART should i use for my first computer?

Folks using the FT254RL (in UM form or just the chip) - how are you address decoding the control lines? Particularly the TxE and RxE. I'm currently struggling over a compact circuit over on page three/four of this thread .
I'm using a Dual 4-input NAND and a 4 Invertors for decoding RD and !WR ...
by pjeaton
Thu Aug 12, 2021 12:22 pm
Forum: Newbies
Topic: What UART should i use for my first computer?
Replies: 27
Views: 6487

Re: What UART should i use for my first computer?

+1 for the (UM)FT245R. I'm using it on my 6809-based Vectrex and it works great, right up to 921,600 as a Forth terminal on my PC via USB.

Importantly, it has easy driver install and no hangups, unlike several other TTL to USB interfaces I've used.

You've sort of glossed over one of the key ...
by pjeaton
Fri May 21, 2021 11:56 am
Forum: Forth
Topic: A small Forth profiler
Replies: 5
Views: 1054

Re: A small Forth profiler

Works now, thanks!
by pjeaton
Fri May 21, 2021 11:27 am
Forum: Forth
Topic: A small Forth profiler
Replies: 5
Views: 1054

Re: A small Forth profiler

I'm interested in having a look, but your links don't work for me, I get GitHub 404.
by pjeaton
Sat Jan 09, 2021 7:16 am
Forum: Forth
Topic: Converting traditional assembly code to Forth assembly code
Replies: 18
Views: 3487

Re: Converting traditional assembly code to Forth assembly c

Yes, CamelForth uses some similar structures, though not with a BRAN.
CODE 0= \ n/u -- flag return true if TOS=0
0 # CMPD, EQ IF,
HERE EQU TOSTRUE -1 # LDD, NEXT
THEN, CLRA, CLRB, NEXT ;C

CODE 0< \ n/u -- flag true if TOS negative
TSTA, TOSTRUE BMI, CLRA, CLRB, NEXT ;C

CODE = \ x1 x2 ...
by pjeaton
Sat Jan 09, 2021 12:28 am
Forum: Forth
Topic: Converting traditional assembly code to Forth assembly code
Replies: 18
Views: 3487

Re: Converting traditional assembly code to Forth assembly c

That looks like source for a metacompiler's assembler. You're right!

I don't see a bias against labels It's certainly subjective, I'm just going by his first sentence: "Even in the era of structured programming, some programmers will insist on labels in their assembler code."

My Forth ...
by pjeaton
Thu Jan 07, 2021 11:57 pm
Forum: Forth
Topic: Converting traditional assembly code to Forth assembly code
Replies: 18
Views: 3487

Re: Converting traditional assembly code to Forth assembly c

I've done an experiment and, roughly, I have a working proof of concept.

The following code (lots of commented out lines, as they don't assemble yet):
RC STA, \ Save it as parameter for PATH
M1 LDA, \ Get "from" position (M1+1 ?????)
M2 STA, \ Initialize "to" position (M1+2 ?????)
BEGIN,
PATH ...
by pjeaton
Thu Jan 07, 2021 11:09 pm
Forum: Forth
Topic: Converting traditional assembly code to Forth assembly code
Replies: 18
Views: 3487

Re: Converting traditional assembly code to Forth assembly c

Quote:
To me, this started looking like an array of addresses. I then came up with this to simplify things:

: ARRAY <BUILDS 2 * ALLOT DOES> 2 * + ;
Thanks - I will consider this also!
by pjeaton
Thu Jan 07, 2021 8:25 pm
Forum: Forth
Topic: Converting traditional assembly code to Forth assembly code
Replies: 18
Views: 3487

Re: Converting traditional assembly code to Forth assembly c

Thanks for your thoughts, guys.

I read the other threads mentioned and though Brad's assembler documentation and it's sparse, with nothing on forward references. In fact, the only reference I had seen was actually in the Camel Forth primitives declarations, where he uses HERE EQU <LABEL> to create ...
by pjeaton
Thu Jan 07, 2021 3:36 pm
Forum: Forth
Topic: Converting traditional assembly code to Forth assembly code
Replies: 18
Views: 3487

Re: Converting traditional assembly code to Forth assembly c

Jeff, thanks for your thoughts.

So you have a similar problem with an 'engineering' workaround, glad I'm not alone. The Forth assembler will handle BEQ, etc, but it can't handle a forward reference as the target. In the listing I gave (I now added line numbers) the BEQ,/BNE, on lines 33 and 40 jump ...
by pjeaton
Thu Jan 07, 2021 12:44 am
Forum: Forth
Topic: Converting traditional assembly code to Forth assembly code
Replies: 18
Views: 3487

Re: Converting traditional assembly code to Forth assembly c

Oh wow, you're right, I'm not a newbie after all, although most of my posts were 16 years ago, I guess they slipped my mind!

...and related microprocessors and microcontrollers."
I hesitated before posting that I was using a 6809 as this is really just a structured-assembly & Forth question and I ...
by pjeaton
Wed Jan 06, 2021 9:25 pm
Forum: Forth
Topic: Converting traditional assembly code to Forth assembly code
Replies: 18
Views: 3487

Converting traditional assembly code to Forth assembly code

Hi All,

(My first post, I think!)

I have a question that I thought might be best considered here, even though it's not strictly 6502 related *ahem*, but bear with me.

I'm using Brad R's excellent CamelForth/6809 that I have running on the Vectrex video game console, from 1982. My current project ...
by pjeaton
Mon Sep 24, 2018 9:48 pm
Forum: Forth
Topic: Is there a non-commercial 6502 Forth cross-compiler for PC?
Replies: 7
Views: 4123

Re: Is there a non-commercial 6502 Forth cross-compiler for

Thanks for your thoughts, guys.

So it still looks like there is no freeware Forth cross compilers for 6502 on the PC, but various people are doing their own thing.