Comments (4)
The ex bc,hl
could be also push hl : ld l,c : ld h,b : pop bc
which is 1 byte longer but -11T faster and in case you have single spare register you can write it as 6x ld
to have 24T total instead of 29T (or yours 40T).
I feel a bit dubious about these, but I guess most of the fake instruction already are dubious, so that's not a good counter argument. I'm more like surprised you are even missing these, that was unexpected for me. :) (how comes, did you run into the need of this in some real project?)
But I guess there's little harm to add them, probably in the faster-but-longer variant doing ld
where possible? If anyone else has opinion/idea about these, please share, so it's not just me vs OP.
from sjasmplus.
Thanks for you quick response.
I just came across those combinations while reading/watching Z80 ASM tutorials, and found out that they were not available among the existing Fake Instructions.
I agree about your -11T+1b combination, it's a better tradeof to save 11 t-states for a single byte. Thanks!
from sjasmplus.
So I have been pondering about this for a while, also discussed it with other users and contributors, and these ex
feels not "attractive enough" for us to add them, we can't recall any good use cases from our experience of writing ZX SW, usually when you long for ex bc,hl
the answer is to write the code in different way to not need it.
The tricky part is that ex de,hl
is only one byte and only 4T (as it's technically just flipping single bit inside CPU, not doing much work, so for anyone not familiar with Z80 ISA having ex bc,hl
on hand would look similarly cheap, while it's lot more costly in the form of fake instruction. And it's using also stack which is another "not attractive" feature.
If you would go through current list of fake instructions, you could easily find few more questionable, which could be rejected by similar reasoning, so please understand this is rather subjective ruling, but I don't see a way how to make this process more objective. I hope you will understand it as it is. I'm definitely glad you did raise this, could be still helpful info for people who would look for it.
In the end, it's reasonable easy to add your own macro if you really need instruction like this, but I would be surprised if you would need this often, we were discussing it among people who delivered tens+ ZX projects over decades and nobody was able to recall good use case.
from sjasmplus.
Thanks anyway for considering my request.
from sjasmplus.
Related Issues (20)
- allow defining custom Devices
- Building on Alpine Linux fails due to clash with constant in musl limits.h HOT 1
- SAVETAP: codeblock of 166 bytes length starting at 0xFF59 saved to .tap HOT 2
- Typo on warning
- [1.20.1][ubuntu 22.04][mingw-w64] Can't compile windows exe without modifying Makefile // Recommendation in Makefile is also not full
- Allow multiple labels as arguments of IFUSED HOT 3
- Multiple ORG directives silently ignored? HOT 2
- Interest in adding a new Z80 device ? VZ200/Laser210 HOT 3
- Incorrect compilation of DC with one symbol in single quotes HOT 5
- Not everything works after return from snapshot to Basic HOT 2
- Arrow keys and ESC don't work after invoking sjasmplus HOT 5
- Tests may fail due to locale settings
- duplicate lables HOT 1
- get include length size HOT 2
- bplist: MAME support HOT 1
- union HOT 1
- lua block parsing inside macro is not aware of being inside lua block, applying sjasmplus parsing rules (colons!) HOT 1
- Concern about instructions like add a,b HOT 4
- INCBIN command assumes current OS path based on the .asm file where it resides. Does this have to be the case? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sjasmplus.