News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_zhulien

A cool Z80 optimisation

Started by zhulien, 07:27, 15 February 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zhulien

http://www.z80.info/sint.htm

I wonder if there are any other obscure but cool Z80 optimisations such as this?

roudoudou

take a look at TI-85 website, spectrum or MSX forums ;)

try this on any search engine
"Z80 math"
"Z80 optimisation"
"z80 fast"
My pronouns are RASM and ACE

zhulien

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?

roudoudou

#3
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


My pronouns are RASM and ACE

Prodatron

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.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM


zhulien

Quote from: roudoudou on 14:29, 15 February 23
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



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.

Powered by SMFPacks Menu Editor Mod