]> foleosoft.com Git - Zeditty.git/summary
 
descriptionZilog Z80 interpreter
last changeWed, 22 Jan 2025 21:07:40 +0000 (16:07 -0500)
readme

Zeditty

A Zilog Z80 interpreter library for C programs.

img

Usage

See the /test folder for an example. The hello.c file is a simple program that asks the user for their name and then outputs Hello, [name]! The Makefile in the /test folder will build this with the Small Device C Compiler and also compile a program called interpret using the zeditty library. If you run the interpret program, it will execute the hello.z80 program.

If you open the interpret.c file, you can see how simple it is to begin interpreting Z80 code. You just have to load the file and run it, while also defining port callbacks. Interrupt callbacks are also supported. In order to get sdcc to compile a program properly, you have to define a crt0.s file. In this case, I built a simple file that calls the _main function and then writes to port 1. The interpret.c file interpets a write to port 1 as equivalent to exit(). It interpets a write to port 0 as putchar() and a read from port 0 as getchar(). These are also defined in the crt0.s file as well using the new SDCC calling convention (meaning, the crt0.s will need to be changed if you are using an old version of sdcc).

shortlog
2025-01-22 serverWed Jan 22 04:07:40 PM EST 2025 master
2025-01-22 serverWed Jan 22 04:05:53 PM EST 2025
2025-01-20 serverMon Jan 20 01:43:43 AM EST 2025
heads
2 months ago master