Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
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: 22 Jun 2003 02:35:07 pm    Post subject:

Could you explain me what is said in the 40th lesson of AsmGuru ?
I'd like to write and then read in a program in order to save a highscore.

But what's the role of the variable "_ASM_IND_CALL" ?
What is PGMIO_EXEC (or maybe PRGMIO_EXEC) ? Is it a subroutine that someone has written ? Or is it a B_CALL ?
What does that mean :

Code:
   B_CALL(_convop1)  ; OP1 is in a
   ld   a, e  ; but then, e is in a ??!!!

??????? Isn't it an error ? Or maybe a part of OP1 is in HL ???
I've never understood what does "_chkfindsym"
Then why do we substract the start of the program at the label ??? highscore-$9d95


I really hope you will be able to answer all these difficult questions !

thx !
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 23 Jun 2003 12:05:27 pm    Post subject:

well, first of all, ur using ASMGuru, which is for the TI-83... the latest version (almost final) of 83pa28d tells how to use SMC (self modifying code)... it could be helpful to you.
Back to top
Tyraniek


Member


Joined: 07 Jun 2003
Posts: 133

Posted: 23 Jun 2003 01:31:27 pm    Post subject:

Thx, I had another version of these files.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 23 Jun 2003 01:32:23 pm    Post subject:

glad i could help! u should check ticalc.org at least once every few days for new/updated files
Back to top
Tyraniek


Member


Joined: 07 Jun 2003
Posts: 133

Posted: 23 Jun 2003 01:33:59 pm    Post subject:

What's more, they explain how to do a fade out !!!!
maybe another version of TLIB will appear one day Wink (as the first I made was also my first asm prgm)
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 23 Jun 2003 01:37:55 pm    Post subject:

well, good luck if u try to do another one! does ur new read/write work?
Back to top
Tyraniek


Member


Joined: 07 Jun 2003
Posts: 133

Posted: 24 Jun 2003 12:09:11 am    Post subject:

I haven't tried yet ! I'm going to pass an exam this morning (the baccalaureate).
I'll be in holydays at 12h00 !!! Then, I'll be able to work on my program Wink
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 24 Jun 2003 11:11:01 am    Post subject:

well, cool! tell us how it works out!
Back to top
Tyraniek


Member


Joined: 07 Jun 2003
Posts: 133

Posted: 24 Jun 2003 12:36:30 pm    Post subject:

my baccalaureat ? wasn't too bad (in fact, it was just an oral ; french oral as I'm french)

Concerning my program, I would now like to know what do you think of that :


Code:
#include "ASM.inc"

#define score   8268h

.org   9d95h
   RST   18h     ; What does EXACTLY this instruction ?

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 1 : Add a value to HL (here, this value is score);;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

   ld   hl, (hscore)
   ld   a, 100     ; do not take care of that;-)
   ld   (score), a  ; I just prepare it to use it with my prgm
   ld   a, (score)  ; in which score = 8268h is the player's score
   ld   e, a
   ld   d, 0

   add   hl, de     ; HL += 100
   ld   (hscore), hl  ; now, we add
   B_CALL(_DispHL)     ; and we display

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; I don't understand these instructions (I don't understand RST 18h neither);;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


   B_CALL(_PopRealO1)  ;Retrieve OP1 for writeback
   B_CALL(_ChkFindSym)

;Find data location as offset from start of program.
   LD   HL,data - $9D95 + 4   ; Alright, I understand it but that means
       ; we HAVE TO use AsmComp(prgmSRC,prgmDEST) before useing it ???

;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; COMPLETELY LOST !!!!!!;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;


   ADD   HL,DE     ; why do we add DE again ?
   EX   DE,HL     ; don't understand why we exhange values
   LD   HL,data     ; why data and not hscore ?
   LD   BC,2     ; copy the 2 bytes of DATA
   LDIR    ; to hscore ( = HL = DE because exchanged)
   RET
data:
hscore:   .db   0000

.end
END


And now, I've got "helluva" lot of questions Razz
- Is it an obligation to use 16-bits registers like HL and DE ? Is it possible to use b, a or c ?
- Does hscore have to be a DW or can it also a db ?
- When I ldir, is it possible to put BC=1 if I've got a db ? If so, what's faster than ldir ? LD ? EX ?
- What the hell is RST 18h ? I've seen it with B_CALL (I think), so I don't think it just saves OP1...
- Why do we add DE 2 times ????
- What does PopReal1 ? What does ChkFindSym ?


Thx very much !
Back to top
JacobdeHaan


Member


Joined: 10 Jul 2003
Posts: 165

Posted: 11 Jul 2003 12:09:13 am    Post subject:

Adm.Wiggin wrote:
the latest version (almost final) of 83pa28d tells how to use SMC (self modifying code)...  it could be helpful to you.

This must be a really stupid question, but I think I have the latest version of 83pa28d, yet I can't find anything about SMC, could you tell me what day it is supposed to be on?
Back to top
Tyraniek


Member


Joined: 07 Jun 2003
Posts: 133

Posted: 11 Jul 2003 12:44:20 am    Post subject:

day 24
"program control"
SMC
Back to top
JacobdeHaan


Member


Joined: 10 Jul 2003
Posts: 165

Posted: 11 Jul 2003 01:29:30 am    Post subject:

Ok, I think I got it now, thanks. Very Happy Very Happy
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 GMT - 5 Hours

 

Advertisement