If you are using the DCS SDK (And therefore, Brass), you should do this for that routine. On the page, it said to "unwind this code XX times", which means you need to copy-paste that code over and over to get the desired effect. Here it is for Brass:
Code:
DivACbyDE:
.repeat 16
  rl c
  rla
  adc hl,hl
  sbc hl,de
  jr nc,$+3
  add hl,de
.loop

  rl c
  rla
  cpl
  ld b,a
  ld a,c
  cpl
  ld c,a
Yeah I did that, but it still can't handle decimals, right? I need to get something like this:

50 - 24756
x - ac

I need to get x.



That's how I get it. However, hl and ac can't handle decimal values.

So, how can I do it?

Either way, just made by first ASM program but I still need help with the above thing...


Code:
; Program Name: Memory Checker
; Author: David Gomes
; Version: 0.1
; 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
 
  res fracDrawLFont,(IY + fontFlags)
 
  ld a,10
  ld (penRow),a
  ld a,1
  ld (penCol),a
  B_CALL (_memchk)
  call VDispHL
 
  ld a,17
  ld (penRow),a
  ld a,1
  ld (penCol),a
  ld hl,OutOf
  B_CALL (_VPutS)
 
  ld a,24
  ld (penRow),a
  ld a,1
  ld (penCol),a
  ld de,24756
  ld h,d
  ld l,e
  call VDispHL
 
  call iFastCopy
  B_CALL (_GetKey)
 
  ret
 
Title:
  .db "Memory Checker",0

OutOf:
  .db "out of",0


Any idea anyone?
  
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
» View previous topic :: View next topic  
Page 10 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