This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
Tyraniek


Member


Joined: 07 Jun 2003
Posts: 133

Posted: 11 Jun 2003 06:39:49 am    Post subject:

How to store the actual picture in asm, and then display it, as if we did

:StorePic 1
:...
:RecallPic 1

in basic ? Do we use the graph buffer ?
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 11 Jun 2003 12:38:53 pm    Post subject:

i believe that u would store the graph buffer to a location in your program using ldir... and then to recall it, just ldir it back to the buffer... not sure though! try this for the store location (Jbirk taught this) :

Code:
.db 0(768)

should do 768 0's!
Back to top
Tyraniek


Member


Joined: 07 Jun 2003
Posts: 133

Posted: 11 Jun 2003 01:41:55 pm    Post subject:

Yes, that's it !
Anyway, even if you write :

Code:
temp:
   .db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   .db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   .db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   .db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   .db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   .db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   .db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   .db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   .db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0


(what I did), it is the same result : the compiler will write all these 0 in the "machine code". I tried it and it works perfectly :

Save the actual pic :

Code:
   ld   hl, plotsscreen  ; sauvegarde dans un emplacement
   ld   de, temp
   ld   bc, 768
   ldir


Reload it into the graph buffer :

Code:
   ld   hl, temp     ; affiche ce qui a été sauvegardé
   ld   de, plotsscreen
   ld   bc, 768
   ldir
   B_CALL(_grbufcpy)


Thx anyway Wink (I suggest you add the little chinese smiley who thanks)
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 11 Jun 2003 02:30:16 pm    Post subject:

You can also look up pic1, pic2, et cetera.

I am not sure of the data format, but there is 768 bytes of data.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 11 Jun 2003 03:06:41 pm    Post subject:

it starts out with 2 size bytes (wasted space since it is always 768 Neutral ), then comes the data in the same way as the buffer i believe...
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 11 Jun 2003 05:57:29 pm    Post subject:

Well another way to put 768 bytes into your program is to.

.ds 768

it will allocate 768 bytes(all 0's)

and yes if you would like to store a picture on screen you could ldir it into your program or into a 768 byte saferam buffer.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement