Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > UXN Instruction Set
2023-07-24 14:33
rupy

Registered: Mar 2020
Posts: 45
UXN Instruction Set

What would you miss most from the C64 instructions?

http://move.rupy.se/file/uxn.png
2023-07-24 14:53
chatGPZ

Registered: Dec 2001
Posts: 11510
What IS this to begin with?
2023-07-24 15:45
rupy

Registered: Mar 2020
Posts: 45
https://100r.co/site/uxn.html
2023-07-24 16:00
TWW

Registered: Jul 2009
Posts: 555
Index registers?
2023-07-24 17:27
chatGPZ

Registered: Dec 2001
Posts: 11510
Ah one of these virtual phantasy "consoles"...

Index registers indeed. Also relative addressing seems to be always PC relative - sounds painful. And there seems to be an instruction to push a value to the stack - but none to pop it back? weird.
2023-07-24 20:22
tlr

Registered: Sep 2003
Posts: 1807
it looks like a stack machine though so it's nothing like a 6502. on the surface it looks very Forth like.
2023-07-25 06:27
ChristopherJam

Registered: Aug 2004
Posts: 1423
Yeah all of the instructions take their operands from the stack - there are no registers per se.
2023-07-25 10:25
rupy

Registered: Mar 2020
Posts: 45
So UXN is the JVM of "6502"-level (8/16-bit) instruction sets?
2023-07-25 11:13
tlr

Registered: Sep 2003
Posts: 1807
more like a 70-80's VM instruction set. Not ideal for actual HW. JVM is newskool.

Not a fan of coding for stack machines myself but the Forth crowd might care for it more I guess.
2023-07-25 13:22
rupy

Registered: Mar 2020
Posts: 45
I meant JVM is stack based only... 90s is new school compared to 70-80 yes.

So a C compiler will manage registers from 0 and up... now I'm curious about that optimization complexity.

Can you tell C compilers to compile without registers to make it stack only!?

Hm: https://stackoverflow.com/questions/28925253/how-to-insist-a-c-..
2023-07-25 21:31
tlr

Registered: Sep 2003
Posts: 1807
Quoting rupy
Can you tell C compilers to compile without registers to make it stack only!?

Hm: https://stackoverflow.com/questions/28925253/how-to-insist-a-c-..

That post is not related.

If you are interested in the technology behind compiling C for stack based machines have a look at gcc backend for the ZPU.

here is a start: https://github.com/zylin/zpugcc/tree/master/toolchain/gcc/gcc/c..
 
... 1 post hidden. Click here to view all posts....
 
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Ko-Ko
theK/ATL
Guests online: 408
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Uncensored  (9.5)
9 Wonderland XIV  (9.5)
10 No Bounds  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Cover Designers
1 Duce  (9.8)
2 Electric  (9.8)
3 Junkie  (9.6)
4 The Elegance  (9.5)
5 Mermaid  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.323 sec.