Assembler Programming

Chat about anything CX16 related that doesn't fit elsewhere
Post Reply
KIM-1
Posts: 2
Joined: Mon May 17, 2021 3:40 pm

Assembler Programming

Post by KIM-1 »


Hi,

Apologies if this is in an FAQ or some other obvious place - I just learned of your project and I have one question: do you suppoort software written in assembler/"bare-metal" development (i.e.raw access to hardware and peripherals)?

My first computer was a KIM-1, which was CMOS 6502-based, and I'm very excited to see what happens!

x16tial
Posts: 177
Joined: Sun Feb 07, 2021 8:23 pm

Assembler Programming

Post by x16tial »


Yes, very much so.  There will be an assembly environment, and the reference guide details how to call kernal functions from assembly.  There also a number of cross assemblers that will target the 65c02/x16.

KIM-1
Posts: 2
Joined: Mon May 17, 2021 3:40 pm

Assembler Programming

Post by KIM-1 »



3 minutes ago, x16tial said:




Yes, very much so.  There will be an assembly environment, and the reference guide details how to call kernal functions from assembly.  There also a number of cross assemblers that will target the 65c02/x16.



"Will be" - so it is yet to be developed, or...?

I'll download the emulator. Is that only a subset of the system, or can it do everything the real unit will be expected to be able to do?

x16tial
Posts: 177
Joined: Sun Feb 07, 2021 8:23 pm

Assembler Programming

Post by x16tial »


It's pretty full featured.  I'd recommend diving into the docs at: https://www.commanderx16.com/forum/index.php?/files/category/8-official-docs/

The FAQ: https://www.commanderx16.com/forum/index.php?/about-faq/

Latest thread about the assembly environment: 


 

Matt Heffernan's YouTube tutorial series on the X16: 





 

Elektron72
Posts: 137
Joined: Tue Jun 30, 2020 3:47 pm

Assembler Programming

Post by Elektron72 »



30 minutes ago, KIM-1 said:




I have one question: do you suppoort software written in assembler/"bare-metal" development (i.e.raw access to hardware and peripherals)?



This is one of the main goals of the X16 platform. While development in languages like C is possible, in many cases it is more difficult than simply writing programs in assembly. As a result, many of the programs that have been written for the system are in assembly.


11 minutes ago, KIM-1 said:




"Will be" - so it is yet to be developed, or...?



The official assembler that will run on the system is still being developed. However, cross-development tools like ca65 (which is being used to write the ROMs) are just as usable as they are for other 6502 systems.


13 minutes ago, KIM-1 said:




Is that only a subset of the system, or can it do everything the real unit will be expected to be able to do?



I believe a few features (e.g. VIA timers) are still missing, but enough of the system is currently emulated that complex programs (such as those available on the Downloads page) can be written.

 

ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

Assembler Programming

Post by ZeroByte »



2 hours ago, Elektron72 said:




I believe a few features (e.g. VIA timers) are still missing,



This one gets me - there are a few things I'd like to do using intervals != 60Hz, and the VIA would be the way to go on that front. So far, the cleverest thing I've seen is what Concerto does. It uses the DSP FIFO low IRQ as a timer by writing in however many samples it would take to create a desired delay - and when the DSP drains out enough samples, it throws an IRQ. Concerto actually has the DSP muted because it's not using PCM audio at all. When I saw that, it was definitely a "press 'F' in chat to pay respects" moment for me.

Post Reply