Orton 3C - Programming - Out of Depth Dad

143 views
Skip to first unread message

Jamesbloke

unread,
Jan 5, 2026, 12:22:52 PMJan 5
to RC2014-Z80
Hi everyone,
Santa in his wisdom bought my son an Orton 3C kit for Christmas (Thanks Santa!). In the past I have managed to learn enough about whatever Santa has brought to start Child 1 off, whether that is a Microbit or a telescope or whatever. But here I admit to being out of my depth.

The construction side we can just about cope with, but what I don't understand is the programming and we are rapidly approaching completion of our build.

I get the mechanics of how to programme it (go to an address and set a value and repeat many times, then press run). But how do you actually programme it??? I've looked at the codeberg link which appears to contain files for writing to a ROM, but have no clue how to get from what I think of as a programme to the hex file or even to the switches to flick.

Can anyone recommend any resources or have a "hello world" programme tutorial to walk us through inputting and running a programme, please?

We have the ROM module and I'm guessing next birthday a rom-writer will be required, any recommendations on how to programme the ROM are also welcome!

I am sure this is the first of many pleas for help, so your patience and help is appreciated.

Thanks
James

Mark T

unread,
Jan 5, 2026, 1:38:06 PMJan 5
to RC2014-Z80
What do you think of as a program? Z80 assembly language or something slightly higher level?

You might try z88dk or some other z80 assembler on a pc to generate a hex file.

Old school method was write out the z80 assembly code for the program, then manually convert to hex using the list of z80 opcodes and binary codes from the z80 datasheet. Not too dificult for very small programs and you probably don’t want to try and enter a large program with the switches on the Orton 3c.

Spencer Owen

unread,
Jan 5, 2026, 2:12:45 PMJan 5
to rc201...@googlegroups.com

Hi James

I guess the I/O Echo is the closest to a Hello World for the Orton 3C.  Getting this to work confirms that you can toggle in a program, run it, read the switch inputs from the I/O Module, and set LED outputs.  See https://codeberg.org/RC2014/RC2014_Orton_3C_Code/src/branch/main/RAM/IO_Echo

In particular, look at the .lst file;

0000 IOECHO:
0000 00 NOP
0001 DB 00 IN A,($00) ; Read Port 0 in to A
0003 00 NOP
0004 D3 00 OUT ($00),A ; Write A to Port 0
0006 C3 00 00 JP IOECHO ; Jump back to start


IOECHO: 0000 DEFINED AT LINE 2
> USED AT LINE 7
0000 .ORG 0x0000 ; Start address of 0

The actual data for the program, starting from address 0 is 00, DB, 00, 00, D3, 00, C3, 00, 00

There are a lot of tutorials online for writing Z80 assembly code, so teaching that is beyond the scope of the Orton 3C, but hopefully the code above points you in the right direction.

Spencer

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/a80c24f3-72cf-4cd8-abc8-b4e187885eb2n%40googlegroups.com.

Jamesbloke

unread,
Jan 5, 2026, 5:48:04 PMJan 5
to RC2014-Z80
Thanks Spencer you've provided the missing information for me on how to read the lst file.

The first 4 digits are the address, then each pair after that represents a z80 assembly command or code. If there is more than one pair, the address will skip a number on the next line. The pair(s) is followed by the code description, a semi-colon, and then the comments.

So if I understand correctly....
0000 00
0001 DB 00
0003 00

would be toggled in as:

Addresss     Value toggles       Action toggles
0000 0001   0000 0000             write on, cycle, write off, cycle to set the value and advance to the next location.
0000 0010   1101 1011             write on, cycle, write off, cycle
0000 0011   0000 0000             write on, cycle, write off, cycle
0000 0100   0000 0000             write on, cycle, write off, cycle

Is that right?

James Harland

unread,
Jan 18, 2026, 4:21:51 AMJan 18
to RC2014-Z80
HI James, I'll pick this up as I've just got my Orton 3C working.

Yes that's right.

For your kid and you I recommend Lance Leventhal's Z80 Aseembly Language Programming. The most practical part are the programs in chapter 4. For example the first one is one's complement, which I did today, and it is nice and visual. I modified it a bit to use addresses 8 and 9, so you don't have to go to address 40 and 41 to see what is happening.  Note that you need to put a value into address 8, and then its one's complement will appear in address 9.

 1    0000                         org 0
 2    0000
 3    0000                         INPUT   = $08
 4    0000                         OUTPUT  = $09
 5    0000
 6    0000 3A 08 00        LD A,(INPUT)
 7    0003 2F                   CPL
 8    0004 32 09 00        LD (OUTPUT),A
 9    0007 76                   HALT
10   0008

You input:
addr   code
0000   00111010
0001   00001000
0010   00000000
0011   00101111
0100   00110010
0101   00001001
0110   00000000
0111   01110110
1000   01101010 # NB this is the data, you can change it then watch its inverse being placed into 1001 after you've run the program.

I got caught out today with how to run programs. You need to follow  *exactly* what is written in the instructions - including leaving the reset switch on while running the program. I had some frustrating moments with this program only working half the time before I realized this.

Cheers,

James

Jamesbloke

unread,
Jan 26, 2026, 8:00:03 AM (13 days ago) Jan 26
to RC2014-Z80
Thanks James, I'll check that guide out & try your code - your various questions on your Orton build have helped me greatly.
James

James Harland

unread,
Jan 26, 2026, 8:59:51 AM (13 days ago) Jan 26
to RC2014-Z80
You're welcome! Let me know if you have any other queries. My knowledge of Z80 assembler is pretty elementary, but maybe I can give you a helping hand. After a conversation here, I've stopped trying to do binary listings and learned to love converting between hex and binary on the fly. I've worked through the sample programs I mentioned in Leventhal, and am now onto the exercises in chapter 4.

 I don't know how old your son is, and maybe you know already, but Usborne put all of their old computing books for free download, including the machine code one, which is for Z80 as well as 6502 if I'm not mistaken.

Jamesbloke

unread,
Jan 27, 2026, 5:59:04 PM (11 days ago) Jan 27
to RC2014-Z80
Thanks. I think the Usborne books are more my level than his! 
OMG! I had this one growing up. Shame the games didn't live up to the sci-fi pictures.
Reply all
Reply to author
Forward
0 new messages