RE: A86: simple code I can't figure out


[Prev][Next][Index][Thread]

RE: A86: simple code I can't figure out



See Code at bottom

Laine Walker-Avina
     LaineW@technologist.com <mailto:LaineW@technologist.com>
Visit My Home Page: http://www.laine.somewhere.net/
If you want to get a message to me fast e-mail me at:
13022213@pager.mirabilis.com <mailto:13022213@pager.mirabilis.com>



> -----Original Message-----
> From: owner-assembly-86@lists.ticalc.org
> [mailto:owner-assembly-86@lists.ticalc.org]On Behalf Of McBorder@aol.com
> Sent: Tuesday, July 06, 1999 8:20 PM
> To: assembly-86@lists.ticalc.org
> Subject: Re: A86: simple code I can't figure out
>
>
>
> , IVlusicman@AOL.COM writes:
>
> >
> >  				--RC
> >  #include "ti86asm.inc"
> >  #include "asm86.h"
> >
> >  .org _asm_exec_ram
> >
> >  Start:
> >   call _clrLCD
> >   call _homeup
You need to tell tell _puts where to put it by loading the adderess on the
screen (similar to the BASIC Disp) into the memory locations _curRow and
_curCol they are ajecent to each other in memory so you can do a 16-bit load
to _curCol and it write to _curCol and _curRow
ex:
 ld hl, _curRow
 ld (hl), $0101  ;prints the text at 01 01
 ld hl, String
 call _puts
> >   ld hl,String
> >   call _puts
> this is all good
> >   ldir
> ldir takes the byte pointed to by hl and copys it to the address
> containd in
> de and decreases bc
> it does this till bc=0
> (hl) moves to (de) and both pointers are increased while bc
> decreases to zero
> when you call it  hl points to the byte after the string
> and de and bc are unknown
> this is probally what makes it crash
>
> also its not a good idea to have
> data such as the string in the middle of the code
> when compiled it will turn up as opticodes and the calc will
> think they are
> part of the program
> just put all your data at the end of the program code
>
>
> >  String:
> >   .db "did it work?",0
> >  Loop:
> >   call _getkey
> >   cp K_EXIT
> >   jr z,Exit
> >   cp K_ENTER
> >   jr z,Exit
> >   jr Loop
> >  Exit:
> >   call _clrLCD
> >   ret
>
> you could make this a <jp _clrLCD>
Call is right
>
> >
> >   .end
> >
>
Warning
Could not process part with given Content-Type: text/x-vcard; name="Laine M Walker-Avina.vcf"

References: