Re: A86: Re: [sqrt] program trouble
[Prev][Next][Index][Thread]
Re: A86: Re: [sqrt] program trouble
This is not a flame, but that is really screwed up!! I have put comments in
your part of the source.
>>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 ;You don't need to do this, the keypress from the user
is returned in a
> cp K_CLEAR ;this is OK
> jr nz,End
> ld hl,Setting-1
> rst 20h
> call $4C47
>End:
> cp a ;what does "cp a" do here??? If you want to
reset a, use "sub 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 =( "
>
______________
JBrett
tbarwick@esn.net
http://ww2.esn.net/~tbarwick
http://members.xoom.com/Plexus