[A83] Re: Enhanced Basic


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

[A83] Re: Enhanced Basic





>> Van: Ronald Teune <rtwolf@gmx.net>
>>
>> [snip]
>>
>> >prgmAPI now reads from BASIC_cursor ($9146) where the BASIC
>> >program hasended, then reads from there what it should do:
>>
>> On 83+ $9146 contains $0000...
>
>I said it was for the Ti83 (so no '+'), for the Ti83+ adresses (have mailed
>these before to this list):

I can remember seeing them at school, but I can't remember seeing them after
school :-~

>[#### $$$$ desc]
> Byte 9652 Type of running BASIC program
>    8 9653 Name of currently running BASIC program
> Word 965B Pointer to start of running BASIC program
> Word 965D Pointer to currently interpreted byte in running BASIC prog
> Word 965F Pointer to last byte of data in running BASIC program
>
> Henk Poley <><

Wow! It works! Thanks a lot!

Who should I give credits for this? You, or someone else?

My test-program (probably still quite crappy):

;(c) Zeekoe! http://www.zeekoe.cjb.net

.nolist
#include "ion.inc" ;not that it's for Ion, just for portability
.list
#ifdef TI83P
        .org    progstart-2
        .db     $BB,$6D
CurBasicByte =$965D
#else
        .org    progstart
CurBasicByte =$9146
#endif

.org        9D93h
.db $BB,$6D

ld hl,saferam1+30
ld de,saferam1
ld bc,29
ldir


ld hl,(CurBasicByte)
inc hl ;Last byte of progname
inc hl ;Enter
inc hl ;"
push hl

;Begin Value(hl,hl+1)
;By http://www.zeekoe.cjb.net, http://ti.zeekoe.cjb.net
;Destroys: a,bc,hl
ld a,(hl)
ld b,$30
sub b

ld c,a  ;A*10
sla c
sla a
sla a
sla a
add a,c

ld c,a  ;store a temporarily
inc hl
ld a,(hl)
sub b
add a,c  ;[a] + [old a]
ld b,a
;End Value(hl,hl+1)
;Output: b=a

pop hl
inc hl ;Number part 1
inc hl ;Number part 2
ld de,$0000
ld (PenCol),de
set textWrite,(IY+sGrFlags)
bcall(_VPutSN)

ret
.end
END


Greetings,
        Ronald Teune
        Using Opera since 08/10/2001
        http://www.zeekoe.cjb.net
        iets@zeekoe.cjb.net
Anything that is good and useful is made of chocolate.
(Bryan Fields, TI-Hardware mailinglist)
A hen is an eggs way to make a new egg.