http://www.z80.info/sint.htm
I wonder if there are any other obscure but cool Z80 optimisations such as this?
take a look at TI-85 website, spectrum or MSX forums ;)
try this on any search engine
"Z80 math"
"Z80 optimisation"
"z80 fast"
Regarding rasm... what is it coded in? Can it be cross compiled to run on Linux? In particular can it run as a php extension?
Quote from: zhulien on 14:00, 15 February 23Regarding rasm... what is it coded in? Can it be cross compiled to run on Linux? In particular can it run as a php extension?
rasm is pure C, it may compile with MorphOS, MacOS, Linux, Windows, MSDOS (with a few restrictions)
i know it's possible to use it with webassembly but do not ask me for details :D
Quote from: zhulien on 07:27, 15 February 23http://www.z80.info/sint.htm
I wonder if there are any other obscure but cool Z80 optimisations such as this?
In fact it is replacing a
CALL condition,#38 (3 bytes, 5 or 3 nops)
by
JR condition,-1 (2 bytes, 3+4 or 2 nops)
You save one byte.
But depending on how often the condition is true, you will loose execution time.
If it's 50:50 you already loose half a nop, if the condition is mostly true, even up to 2 nops.
This was even referenced in JSW2!
https://tcrf.net/Jet_Set_Willy_II:_The_Final_Frontier_(Amstrad_CPC)
Quote from: roudoudou on 14:29, 15 February 23Quote from: zhulien on 14:00, 15 February 23Regarding rasm... what is it coded in? Can it be cross compiled to run on Linux? In particular can it run as a php extension?
rasm is pure C, it may compile with MorphOS, MacOS, Linux, Windows, MSDOS (with a few restrictions)
i know it's possible to use it with webassembly but do not ask me for details :D
Sounds Like what I am trying to do. Actually in 8bitology I used someone else's assembler to allow for online assembly of z80. It really never got to commercial quality so it can't really assemble much. I'd love to use rasm for my cross assembler which would allow direct assembly and download to a real cpc via m4.