Author |
Message |
Forum: Programming Topic: All roads lead to Rome: a little coding challenge |
resman |
Posted: Sat Apr 06, 2024 4:16 pm
|
|
Replies: 18 Views: 6865
|
To expand little on what both drogon and dmsc wrote, PLASMA 2.0 byte code was expanded to include immediate forms of many operations. A peephole optimizer was added to the compiler that combined many simple sequences into the new byte codes. By looking at the output of the compiler for a bunch of di... |
|
|
Forum: Programming Topic: All roads lead to Rome: a little coding challenge |
resman |
Posted: Fri Apr 05, 2024 6:03 pm
|
|
Replies: 18 Views: 6865
|
Take 2: You could always fill the page with $4C. At location $4C4C, put a JMP ROME there. Probably pretty hard to stick a jump like that in the middle of the address space like that.
However, I think there are better ways than trying to encode the literal into the JSR address. |
|
|
Forum: Programming Topic: All roads lead to Rome: a little coding challenge |
resman |
Posted: Thu Apr 04, 2024 8:59 pm
|
|
Replies: 18 Views: 6865
|
Not a general solution for all 8 bit values, but for 64 values, one could fill the 256 bytes with: LIT64BASE: LDA #1 BNE +126 ; FIRST 32 ENTRIES MUST USE BRANCH TRAMPOLINE TO GET TO ROME LDA #2 BNE +126 ... LDA #62 BNE ROME LDA #63 BNE ROME LDA #64 ROME: STA STACK,X INX LDA #0 STA STACK,X INX RTS Th... |
|
|
Forum: Emulation and Simulation Topic: lib6502/run6502 updates |
resman |
Posted: Sat Mar 16, 2024 6:28 pm
|
|
Replies: 1 Views: 1041
|
Here is a very minor update to Ian Piumarta's excellent 6502 simulator. I was in need of a simple command line environment to test my Apple 1 PLASMA VM - running a full blown emulator was just too inconvenient to test my code. However, lib6502 didn't easily allow for tracing executing code which is ... |
|
|
Forum: Programming Topic: PLASMA (Proto Language ASeMbler for All) version 2.0 release |
resman |
Posted: Thu Feb 29, 2024 3:38 pm
|
|
Replies: 5 Views: 3095
|
BigEd wrote: Thanks for the video explanation!
I always feel the need to apologize for my videos |
|
|
Forum: Programming Topic: PLASMA (Proto Language ASeMbler for All) version 2.0 release |
resman |
Posted: Wed Feb 28, 2024 3:36 pm
|
|
Replies: 5 Views: 3095
|
|
|
Forum: General Discussions Topic: prodos 8 filesystem "inside" a static 32Mb SD card file? |
resman |
Posted: Mon Feb 19, 2024 5:38 pm
|
|
Replies: 15 Views: 4637
|
That is some amazing breadboard work. I should have mentioned this earlier since you wanted ProDOS support - here is a super minimal ProDOS interface file: https://github.com/peterferrie/prorwts Very useful in memory constrained devices. Peter uses it to port single load DOS games to ProDOS compatib... |
|
|
Forum: Programming Topic: W65C816 Data Bank Register in Emulation Mode |
resman |
Posted: Sat Feb 17, 2024 3:42 pm
|
|
Replies: 6 Views: 2408
|
.. It doesn't seem to. Should the above code store 255 at $00:0000 or $38:0000? And whilst writing this I've realised it's because the stack is still in ROM so I can't push anything to it. ... I'm not sure about the DBR in emulation but unless you have ROM in $0100-$01FF (which would seem odd), pus... |
|
|
Forum: Programming Topic: PLASMA (Proto Language ASeMbler for All) version 2.0 release |
resman |
Posted: Thu Feb 15, 2024 10:25 pm
|
|
Replies: 5 Views: 3095
|
PLASMA 2.1 Released A great number of performance and reliability improvements. The big feature update is PLFORTH, a FORTH language module for PLASMA that makes FORTH a first class citizen to the PLASMA environment. Many on-the-metal programming tools for software development or use PLASMA as a comm... |
|
|
Forum: Forth Topic: Forth as an interactive BATCH language |
resman |
Posted: Thu Feb 15, 2024 4:11 pm
|
|
Replies: 22 Views: 1901
|
Very clever. I still think like I'm programming in a HLL; need to make the mental shift. |
|
|
Forum: General Discussions Topic: Whats the most human-friendly instruction set? |
resman |
Posted: Wed Feb 14, 2024 2:43 pm
|
|
Replies: 50 Views: 6335
|
For me, it really comes down to instruction scheduling. Being able to hold most of the instruction set and cycle counts in my head (harder and harder the older I get!) is key to "human friendly" assembly programming. I think the 6502 is tops in that category. But other 8 bitters fall into ... |
|
|
Forum: Forth Topic: Forth as an interactive BATCH language |
resman |
Posted: Sun Feb 11, 2024 11:09 pm
|
|
Replies: 22 Views: 1901
|
I just wanted to point out that forth-standard.org has reference implementations (for the Forth 2012 standard) for many words. You might be interested in their [IF]/[ELSE]/[THEN] implementation as they did it a little differently, but also handle nested [IF]s. Their [IF] is very short and all of th... |
|
|
Forum: Forth Topic: Forth as an interactive BATCH language |
resman |
Posted: Sun Feb 11, 2024 6:19 pm
|
|
Replies: 22 Views: 1901
|
Well, darn. Came across an old Forth manual (Apple II Forth 1.7 by John Draper aka Cap'n Crunch) that documented ?EXEC as the word to test if interpreting vs compiling. So [IF][ELSE][THEN] it is. A few quick tests appeared to confirm proper functionality. And I got to use a few things I learned in t... |
|
|
Forum: Forth Topic: Forth as an interactive BATCH language |
resman |
Posted: Fri Feb 09, 2024 12:36 am
|
|
Replies: 22 Views: 1901
|
... I'm a fan of function pointers, so I'll be using this quite a bit. If you are a fan of function pointers, I hope you have seen mini-oof ("mini-object-oriented-forth): https://bernd-paysan.de/mini-oof.html That's very cool! Many of my larger PLASMA modules start with a table of function poi... |
|
|
Forum: Forth Topic: Forth as an interactive BATCH language |
resman |
Posted: Wed Feb 07, 2024 11:34 pm
|
|
Replies: 22 Views: 1901
|
One setting where DEFER can be real handy is where you have mutually recursive words -- say, a pair of words where each word may, depending on state, call the other word. If you define "Word1" first, and "Word2" second, you can: DEFER Word1 : Word2 ( ... ) ... ; :NONAME \ Word1 ... |
|
|
Sort by: |