Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Proportional pixel-precise printing anywhere on screen
#3
No, don't dump your code, post it here. This one has 1,5 KB after compilation, so yours is maybe shorter. Please publish it. And we don't have a 64 char/line routine here yet (I ripped the one from tasword II, but it allows only to put text on screen thirds).
If you want to leave a pixel gap between characters, you can change xgap value to from 0 to 1. I wanted just to demonstrate how condensed it can print.
You are right, Your method of poking the values save bytes and time, but at least time is not so important here because this will be done once per line, so we cannot save much time, But thank you for the tip, it will be useful in other programs.
Self modyfing code is dangerous with code optimiser. I made a SUB to put a graphics block on screen, using self modyfing ASM code, but the first version was screwed by the optimiser until I found the reason. The result was a crash of the emulator.
We cannot write this:
Code:
LD HL,0
LD DE,0
LD BC,0
LDIR
to modity it later, because optimiser turns it into:
Code:
LD HL,0
LD D,H
LD E,L
LD BC,0
LDIR
Which is a bit faster and smaller, but trying to modify the old code will break it.
I wonder why LD BC is not turned into LD B,H:LD C,L too, maybe the compiler does not expect a third equal Register assignation.
I solved this by changing it into:
Code:
LD HL,1
LD DE,2
LD BC,3
LDIR
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)