Got questions? Got answers? Go here for both.
Moderator: MaxCoderz Staff
Timendus
Calc King
Posts: 1729 Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:
Post
by Timendus » Fri 03 Mar, 2006 4:42 pm
Are pointers store LSB or MSB first? I'm trying to do this:
Code: Select all
ld hl,data
ld d,(hl) ; or should it be ld e,(hl)?
inc hl
ld e,(hl) ; or should it be ld d,(hl)?
ex de,hl
; hl = pointer to picture
; display it or whatever
ret
data:
.dw picture
picture:
; picture data
I've got a bug in my code, so both ways give unexpected results. It would be nice to be sure about this before I try to work that bug out, otherwise I'd have to change my code in four places two times for each testrun
benryves
Maxcoderz Staff
Posts: 3087 Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:
Post
by benryves » Fri 03 Mar, 2006 5:19 pm
Least significant byte first. The Z80 is little-endian.
Spencer
Extreme Poster
Posts: 346 Joined: Mon 17 Jan, 2005 8:56 am
Location: Indiana
Post
by Spencer » Fri 03 Mar, 2006 5:19 pm
By default, TASM will store it LSB first. You can change this with a directive if needed. The code in your comments is the correct code, then.
If you get fed up with TASM's slowness, my assembler will always store the pointer LSB first.
Timendus
Calc King
Posts: 1729 Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:
Post
by Timendus » Fri 03 Mar, 2006 5:51 pm
Heheh
Thank you both, I had already figured it out but thanks a lot anyway
(It's working! It's working! It's working! Woot
)
By the way, I use Brass
Jim e
Calc King
Posts: 2457 Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:
Post
by Jim e » Fri 03 Mar, 2006 6:37 pm
ZOMFG!!! CLASH OF THE ASSEMBLERS!!!!!
benryves
Maxcoderz Staff
Posts: 3087 Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:
Post
by benryves » Fri 03 Mar, 2006 6:47 pm
Jim e wrote: ZOMFG!!! CLASH OF THE ASSEMBLERS!!!!!
Heh, I've pretty much given up on Brass now, it's redundant.
Timendus
Calc King
Posts: 1729 Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:
Post
by Timendus » Fri 03 Mar, 2006 7:42 pm
Nooooo!! Don't give up on it! I love Brass
Besides, I still need someone to get me greyscale picture include
tr1p1ea
Maxcoderz Staff
Posts: 4141 Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:
Post
by tr1p1ea » Sat 04 Mar, 2006 7:37 am
Just save each layer individually as B&W and use the ordinary include?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Timendus
Calc King
Posts: 1729 Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:
Post
by Timendus » Sat 04 Mar, 2006 12:07 pm
Yes, that's what I do now, but it's more work than it should be in my opinion. On the other hand it's a bit too much work to write a script for it too
Having the include command convert a greyscale image to two layers of binary data would be perfect
Shadow Phoenix
Calc Guru
Posts: 835 Joined: Mon 03 Jan, 2005 7:54 pm
Location: out there. seriosly.
Post
by Shadow Phoenix » Sun 05 Mar, 2006 12:13 am
..or just use Jim's package
Life is getting better.
Timendus
Calc King
Posts: 1729 Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:
Post
by Timendus » Sun 05 Mar, 2006 1:37 am
Why do people keep saying that on random occasions?
Obviously I already use the RGP, since it takes me about two mouseclicks to embed it into any of my programs thanks to the API...
Jim e
Calc King
Posts: 2457 Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:
Post
by Jim e » Sun 05 Mar, 2006 1:53 am
Most people promote it more than I do....
KevinJB
Calc Wizard
Posts: 501 Joined: Sat 28 May, 2005 5:34 am
Location: Chesapeake, Virginia
Contact:
Post
by KevinJB » Sun 05 Mar, 2006 4:10 pm
Most people wnat you to release it...!