Bump?
May I re-bump in Cemetech?
ScoutDavid wrote:
If I do that, then I won't be testing 'and hl' the right way I think.
<EDIT> The z flag is set, popping won't reset it actually I think</EDIT>

http://pastebin.com/LqNhsVWq

Here it is, my current code, the sprite goes wild.
You left the pop hl after the Gravity update by accident. Please start tabbing in on pushes and out on pops so it's easier to find mismatched push/pop numbers.
I removed it and now it displays everything fine. However, the gravity doesn't work well, because the sprite goes through the line.
ScoutDavid wrote:
I removed it and now it displays everything fine. However, the gravity doesn't work well, because the sprite goes through the line.
So now the collision doesn't work again, then? What debugging steps have you taken to try to resolve that?
I tried adding triple lines to see if having more than 1 line worked.

Only that so far, I think the problem is I'm drawing the sprite before the line, but that's not happening.
ScoutDavid wrote:
I tried adding triple lines to see if having more than 1 line worked.

Only that so far, I think the problem is I'm drawing the sprite before the line, but that's not happening.
So can I therefore assume that adding triple lines did not work?
KermMartian wrote:
ScoutDavid wrote:
I tried adding triple lines to see if having more than 1 line worked.

Only that so far, I think the problem is I'm drawing the sprite before the line, but that's not happening.
So can I therefore assume that adding triple lines did not work?


Oh sorry, yeah it didn't work Razz
So what do you suspect the current problem is that's making it pass through the lines? Feel free to re-pastebin the code if you'd like.
I won't give up on this, but I want to make a new program.

How to know the total amount of RAM and the used one and the total amount of Archive and used one?

Thanks

PS: I need to know them with Asm code, I just usually use DCS7 for that.
ScoutDavid wrote:
I won't give up on this, but I want to make a new program.

How to know the total amount of RAM and the used one and the total amount of Archive and used one?

Thanks
Total amount of RAM is slightly over 24KB; the bcall _FreeRAM or _memchk (bcall $441A) tells you the amount of free memory; there's also _enoughmem. The archive one is a little more complicated.
Doesn't total amount of RAM change from calc to calc?

EDIT:

Total RAM = 24756 bytes at least in my NSpire.
ScoutDavid wrote:
Doesn't total amount of RAM change from calc to calc?

EDIT:

Total RAM = 24756 bytes at least in my NSpire.
Total RAM is always the same on every 83+ and 84+ calc.
Thanks JosJuice.

I got a new problem when coding.


Code:
.nolist
#include "ti83plus.inc"
#include "dcs7.inc"
.list
   .org userMem-2
   .db $BB,$6D
Init:
  B_CALL (_ClrLCDFull)
 
  set   7,(iy+20)
 
  ld hl,0
  ld (curCol), hl
  ld hl,Title
  B_CALL (_PutS)
 
  ld h,0
  ld l,10
  ld d,96
  ld e,10
  ld a,1
 
  call fastline
 
  call iFastCopy
 
  B_CALL (_GetKey)
 
  ret
 
Title:
  .db "Hello World",0


My goal is to display a text with a line below it.

However, only the line is displayed.

I even did set 7,(iy+20) to allow both text and graphics in the graphscreen.

What am I doing wrong? Thanks
"set 7,(iy+20)" << What is that in symbols? Are you sure it's not $20? I'd use the symbols for the flags if I were you.
I tried set 7,(iy+$20) and no luck too. What are symbols?
Symbols are names, rather than magic numbers. For instance, rather using $9872, you would type "appbackupscreen".

Code:

; Written for Doors CS 7.0 and higher
.nolist
#include "ti83plus.inc"
#include "dcs7.inc"
.list
   .org userMem-2
   .db $BB,$6D
Init:
  B_CALL (_ClrLCDFull)
 
  set textWrite,(IY + sGrFlags)
  SET fracDrawLFont,(IY + fontFlags)
 
  ld a,1
  ld (penCol), a
  ld a,1
  ld (penRow), a
  ld hl,Title
  B_CALL (_VPutS)
 
  ld h,0
  ld l,9
  ld d,95
  ld e,9
  ld a,1
  call fastline
 
  call iFastCopy
 
  B_CALL (_GetKey)
 
  ret
 
Title:
  .db "Hello World",0


I managed to display the text where I wanted it, the way I wanted it.

Now I want to display the value I have in hl (I will get it through a Bcall). How can I display a value of HL in that screen?

I know I can use DispHL, but DispHL is homescreen, so how to display it there?

Thanks

I also got this routine in Axe, can it be of use?


Code:
p_DispInt:
   .db 3
   B_CALL(_DispHL)
Have you read TI_Coder's ASM thread? I think I explained it pretty well there.

Code:
  ld a,11             ;Y=11
  ld (penRow),a
  ld a,1              ;X=1
  ld (penCol),a
 
  B_CALL (_memchk)    ;LD is now Free RAM
  ld de,24756         ;DE is now Max RAM
 
  ;Set AC to HL
  ld a,h             
  ld c,l
 
  ;Set hl to 0, required by DivACbyDE routine
  ld hl,0
  call DivACbyDE
 
  ;Set HL to BC, the quotient
  ld h,b
  ld l,c
 
  call VDispHLL


DivACbyDE is:


Code:
DivACbyDE:
  rl c
  rla
  adc hl,hl
  sbc hl,de
  jr nc,$+3
  add hl,de

  rl c
  rla
  cpl
  ld b,a
  ld a,c
  cpl
  ld c,a


I found it here.

Now since I'm dividing FREE RAM by MAX RAM, I should get a value minor than 1.

What I need is to have that number out of 40..... How can I do that? Perhaps it's too complex?
  
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
» Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
» View previous topic :: View next topic  
Page 9 of 10
» All times are UTC - 5 Hours
 
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 vote in polls in this forum

 

Advertisement