Re: A86: Re: [sqrt] program trouble


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

Re: A86: Re: [sqrt] program trouble






>From: "Dux Gregis" <assets@eden.rutgers.edu>
>To: <assembly-86@lists.ticalc.org>
>Subject: Re: A86: Re: [sqrt] program trouble
>Date: Tue, 6 Oct 1998 16:02:00 -0400
>Reply-To: assembly-86@lists.ticalc.org
>
>
>
>It sounds like you have a problem with label orginzation, but I really 
can't
>help you unless you post the source.
>

Okay, heres the source:

----Begin Source----

#include "ti86asm.inc"
#include "asm86.h"
#include "ti86abs.inc"
.org _asm_exec_ram

 ld hl,$5a92                    ;points to [sqrt]key name in memory
 rst 20h                ;[sqrt]KEY -> OP1
 rst 10h                                ;_findsym
 call nc,_delvar                ;if prog already exists, delete it
 ld hl, code_end - code_start   ;prog length
 call _CREATEPROG               ;make program. name already in OP1
 ld a,b                                 ;copy bde
 ex de,hl                               ;to ahl
 call $4c3f                             ;ahl += 2
 call _SET_ABS_DEST_ADDR        ;set ahl as destination
 xor a                                  ;clear a since ahl is size
 ld hl,code_end - code_start    ;size of prog
 call _SET_MM_NUM_BYTES         ;set ahl as length
 ld hl,code                             ;hl points to code (a is already 
0)
 call _SET_ABS_SRC_ADDR         ;set ahl as source
 call _mm_ldir                  ;24 bit ldir
 set 6,(iy+$24)                 ;enables program
 ret                                    ;quit

code:
.org _asm_exec_ram-2
code_start:
.db $8e,$28                             ;define asm token as first prog 
bytes
 call $479f                             ;pop op1 (the calling prog push 
it)
 bit 4, (iy+18)        ;alpha
 ret nz
 call GET_KEY
 cp K_CLEAR
 jr nz,End
 ld hl,Setting-1
 rst 20h
 call $4C47
End:
 cp a
 ret
Setting:
 .db 8,"BlitZÉNT"
code_end:
.end

----End Source----

I used the source of Yugi 2 for most of it. I probably did something 
wrong.

-InFuZeD " I need help =( "


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com