MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Fri 03 Mar, 2006 4:42 pm 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
Are pointers store LSB or MSB first? I'm trying to do this:

Code:
   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 :)

_________________
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 03 Mar, 2006 5:19 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Least significant byte first. The Z80 is little-endian.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 03 Mar, 2006 5:19 pm 
Offline
Extreme Poster

Joined: Mon 17 Jan, 2005 8:56 am
Posts: 346
Location: Indiana
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. :wink:


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 03 Mar, 2006 5:51 pm 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
Heheh :P

Thank you both, I had already figured it out but thanks a lot anyway :)

(It's working! It's working! It's working! Woot :mrgreen:)

By the way, I use Brass ;)

_________________
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 03 Mar, 2006 6:37 pm 
Offline
Calc King
User avatar

Joined: Sun 26 Dec, 2004 5:27 am
Posts: 2457
Location: SXIOPO = Infinite lives for both players
ZOMFG!!! CLASH OF THE ASSEMBLERS!!!!!

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 03 Mar, 2006 6:47 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Jim e wrote:
ZOMFG!!! CLASH OF THE ASSEMBLERS!!!!!
Heh, I've pretty much given up on Brass now, it's redundant.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 03 Mar, 2006 7:42 pm 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
Nooooo!! Don't give up on it! I love Brass :(
Besides, I still need someone to get me greyscale picture include ;)

_________________
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat 04 Mar, 2006 7:37 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4095
Location: I cant seem to get out of this cryogenic chamber!
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."
Image
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat 04 Mar, 2006 12:07 pm 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
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 :modest: :yes:

_________________
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun 05 Mar, 2006 12:13 am 
Offline
Calc Guru
User avatar

Joined: Mon 03 Jan, 2005 7:54 pm
Posts: 835
Location: out there. seriosly.
..or just use Jim's package :P

_________________
Life is getting better.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun 05 Mar, 2006 1:37 am 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
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...

_________________
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun 05 Mar, 2006 1:53 am 
Offline
Calc King
User avatar

Joined: Sun 26 Dec, 2004 5:27 am
Posts: 2457
Location: SXIOPO = Infinite lives for both players
Most people promote it more than I do....:?

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun 05 Mar, 2006 4:10 pm 
Offline
Calc Wizard

Joined: Sat 28 May, 2005 5:34 am
Posts: 501
Location: Chesapeake, Virginia
Most people wnat you to release it...!

_________________
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
KevinJB | RevSoft


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt