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
CobyWalker


Newbie


Joined: 03 Jul 2008
Posts: 22

Posted: 21 Aug 2008 05:17:28 pm    Post subject:

Can someone tell me why this doesn't show a picture then wait for a key?


Heres the code(LateNite,Brass):

Code:
; ===============================================================
; Pictures
; ===============================================================

.module Program
.export

   Main
    ld hl,PICTURE
    ld de,PLOTSSCREEN
    ld bc,768
    ldir
    b_call(_GrfBufCpy)
    b_call(_GetKey)
    ret
    
PICTURE:
 .db $00,$00,$03,$FE,$07,$FF,$FF,$FF,$FB,$FF,$E0,$00
 .db $00,$00,$07,$FC,$3F,$FF,$FF,$FF,$F9,$FF,$E0,$00
 .db $00,$00,$0F,$F9,$FF,$FF,$FF,$FF,$F8,$FF,$F0,$00
 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$F0,$7F,$F8,$00
 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$E0,$1F,$FC,$00
 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$C0,$0F,$FE,$00
 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$C0,$07,$FF,$00
 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$E0,$03,$FF,$C0
 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$F0,$03,$FF,$E0
 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$F8,$01,$FF,$F0
 .db $7F,$FF,$FF,$FC,$FF,$C7,$FF,$FF,$FE,$01,$FF,$F8
 .db $01,$FF,$FF,$F8,$FF,$87,$FF,$FF,$FF,$01,$FF,$FC
 .db $00,$1F,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$00,$00,$00,$00,$00,$00,$00
 .db $FF,$FF,$FF,$80,$01,$FF,$FC,$00,$00,$00,$00,$00
 .db $F8,$00,$7F,$80,$7F,$FF,$F8,$00,$00,$00,$3F,$F8
 .db $E0,$00,$FF,$C0,$3F,$FF,$F0,$00,$03,$FF,$FF,$FE
 .db $C0,$01,$FF,$C0,$3F,$FF,$F0,$07,$FF,$FF,$FF,$FF
 .db $00,$03,$FF,$00,$3F,$FF,$F0,$0F,$FF,$FF,$FF,$FF
 .db $00,$07,$FE,$20,$1F,$FF,$E0,$0F,$FF,$FF,$FF,$FF
 .db $00,$07,$FC,$20,$1F,$FF,$C0,$1F,$FF,$FF,$FF,$FF
 .db $00,$07,$FC,$60,$0F,$FF,$80,$1F,$FF,$FF,$FF,$FF
 .db $00,$07,$FF,$F0,$0F,$FF,$80,$1F,$FC,$7F,$FF,$FF
 .db $00,$07,$FF,$F0,$07,$FF,$00,$1F,$F8,$3F,$FF,$FF
 .db $03,$FF,$FF,$F8,$03,$FE,$00,$0F,$F0,$1F,$FF,$FF
 .db $0F,$FF,$FF,$F8,$03,$FE,$00,$07,$F0,$1F,$FF,$FF
 .db $3F,$FF,$FF,$FC,$00,$00,$00,$07,$F0,$1F,$FF,$FF
 .db $FF,$FF,$FF,$FE,$00,$00,$00,$00,$00,$1F,$FF,$FF
 .db $FF,$FF,$FF,$FE,$00,$00,$00,$00,$00,$1F,$FF,$FF
 .db $FF,$FF,$FF,$FE,$00,$00,$00,$00,$00,$00,$FF,$FF
 .db $FF,$FF,$FF,$FF,$80,$00,$00,$00,$00,$00,$3F,$FF
 .db $FF,$FF,$FF,$FF,$C0,$00,$00,$00,$00,$00,$1F,$FF
 .db $FF,$FF,$FF,$FF,$E0,$00,$00,$00,$00,$00,$03,$FF
 .db $FF,$FF,$FF,$FF,$FF,$80,$38,$00,$00,$00,$00,$FF
 .db $FF,$FF,$FF,$FF,$FF,$00,$7F,$C0,$00,$00,$00,$3F
 .db $FF,$FF,$FF,$FF,$FE,$00,$7F,$E0,$1F,$00,$00,$0F
 .db $FF,$FF,$FF,$FF,$FE,$00,$FF,$FF,$FF,$F8,$00,$07
 .db $FF,$FF,$FF,$FF,$FC,$01,$FF,$FF,$FF,$FE,$00,$01
 .db $CF,$FF,$3F,$FF,$F8,$03,$FF,$F8,$1F,$FF,$00,$00
 .db $3F,$F8,$7F,$FF,$F0,$03,$FF,$FF,$FF,$FF,$E0,$00
 .db $7F,$F0,$FF,$FF,$F0,$07,$FF,$FF,$FF,$FF,$F8,$00
 .db $FF,$E0,$FF,$FF,$E0,$0F,$FF,$FF,$FF,$FF,$FE,$00
 .db $FF,$C1,$FF,$FF,$C0,$1F,$FF,$FF,$FF,$FF,$FF,$80
 .db $FF,$83,$FF,$FF,$80,$1F,$FF,$FF,$FF,$FF,$FF,$C0
 .endmodule


Last edited by Guest on 25 Aug 2008 07:54:08 pm; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 21 Aug 2008 06:12:00 pm    Post subject:

I can't think of anything other than incorrect syntax for your particular IDE.

What's your setup?
Back to top
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 21 Aug 2008 06:13:09 pm    Post subject:

The only thing that I can readily see is that there's no header.

Apart from that, I can't see what's wrong with the code. If whatever assembler you're using is producing errors or warnings, it would be much appreciated (and helpful) to post those too.
Back to top
fourchanb


Advanced Newbie


Joined: 24 Sep 2006
Posts: 93

Posted: 21 Aug 2008 06:21:41 pm    Post subject:

Try running your program through a shell like MirageOS or CrunchyOS.
Back to top
Liazon
title goes here


Bandwidth Hog


Joined: 01 Nov 2005
Posts: 2007

Posted: 21 Aug 2008 06:54:31 pm    Post subject:

maybe you should try looping until a specific key (other than typical selection keys to run the program) is pressed. if that still doesn't work, then it could be an assembler issue.
Back to top
benryves


Active Member


Joined: 23 Feb 2006
Posts: 564

Posted: 21 Aug 2008 07:53:15 pm    Post subject:

Try replacing b_call() with bcall().

Also, instead of b_call(_GetKey), try something like this:


Code:
-  bcall(_getCSC)
    cp skClear
    jr nz,{-}
    ret
Back to top
asdf


Advanced Newbie


Joined: 17 Aug 2008
Posts: 73

Posted: 21 Aug 2008 07:55:19 pm    Post subject:

Liazon wrote:
maybe you should try looping until a specific key (other than typical selection keys to run the program) is pressed.  if that still doesn't work, then it could be an assembler issue.

I don't think that is the issue, as _getkey is pretty slow to recognize a key press. Are PLOTSSCREEN and the bcalls defined?

A typical header for the 83+ might look like this:

Code:
#include "ti83plus.inc"
     .org progstart - 2
     .db  $BB,$6D


I don't know how Latenite/Brass function, but if it spits out a .lst file if you could paste that here that might clear some things up.

EDIT: And if it isn't recognizing b_call(), you can do what benryves said or add this line:

Code:
#define b_call(xxxx) rst 28h \ .dw xxxx
Though i don't know that that is the problem if you are getting an .8xp file.

Last edited by Guest on 21 Aug 2008 08:00:45 pm; edited 1 time in total
Back to top
benryves


Active Member


Joined: 23 Feb 2006
Posts: 564

Posted: 21 Aug 2008 08:48:20 pm    Post subject:

asdf wrote:
A typical header for the 83+ might look like this:

Code:
#include "ti83plus.inc"
     .org progstart - 2
     .db  $BB,$6D

[post="126234"]<{POST_SNAPBACK}>[/post]
If using the templates bundled with Latenite, do not add a header, as they are defined with the template (externally to the main program source code file). Improving the signal to noise ratio and all that jazz.

Last edited by Guest on 21 Aug 2008 08:48:46 pm; edited 1 time in total
Back to top
fourchanb


Advanced Newbie


Joined: 24 Sep 2006
Posts: 93

Posted: 22 Aug 2008 04:16:28 am    Post subject:

If he made the program for a shell it would quit immediately, because the shell header starts with $C9 (ret). I don't know what the latenite things do though.
Back to top
CobyWalker


Newbie


Joined: 03 Jul 2008
Posts: 22

Posted: 22 Aug 2008 11:23:19 am    Post subject:

Thanks all that posted and Benryves.

I replaced B_call with bcall and it fixed it.

Why is this though? Does latenite use bcall instead of B_Call?

It works.

Also you don't need headers in Latenite.
Back to top
benryves


Active Member


Joined: 23 Feb 2006
Posts: 564

Posted: 22 Aug 2008 08:40:34 pm    Post subject:

CobyWalker wrote:
I replaced B_call with bcall and it fixed it.

Why is this though? Does latenite use bcall instead of B_Call?
[post="126241"]<{POST_SNAPBACK}>[/post]
Yes. If you'd like to use b_call you can open the file "TIOS Calls.asm" and replace the declaration in there.

Code:
.define bcall   rst rBR_CALL \ .dw _

This is also defined, so bcall GrfBufCpy will also work (note lack of _).
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