Subject: RE: [TI-99/4A] FIXED: advanced basic assembly question

From: Insane Multitasker <[email-masked]>
Date: Mon, 25 Nov 2013 14:51:18 -0600

I found the nasty little bug in Advanced BASIC and from what I can tell, it's been there for quite some time.  

In folder 166, file ASM2000N, just before label CALARE there is a "MOV  @SAVER0,R0"

When assembled, the source value is incorrect due to a required offset which forces certain values into the 0x2000-0x3fff area, for Extended BASIC compatibility.  

The statement should instead read:

"MOV  @SAVER0-ASOF,R0"

When reassembled, Advanced BASIC now properly passes values using the CALL LINK() subroutine. 

If anyone is still using AB and would like the reassembled copy, send me an email. 

Tim

 

To: [email-masked]; [email-masked]
From: [email-masked]
Date: Sun, 24 Nov 2013 19:45:44 -0600
Subject: [TI-99/4A] advanced basic assembly question

Anyone know the trick to passing string variables between assembly and the geneve's advanced basic?  
 
No matter what I try, AB returns a BAD VALUE error.  I had some sporadic success with AB 3.00 and none with AB4.04.   The code works just fine in Extended BASIC.   I checked Jim's AB manual where he notes the STRASG command is at 0x2010, same place as in XB.  
 
Here are the latest two routines - one with my own WS the other using the caller WS.  I looked at the AB source code but nothing stands out.   Most frustrating. 
 
--------
5 CALL INIT::CALL LOAD("TESTO")
10 CALL LINK("TEST",A$)::PRINT A$
20 CALL LINK("TEST2",A$)::PRINT A$
---------
       DEF  TEST,TEST2
MYWS   BSS  >20           * simple workspace
BUFFER BYTE >0B           *length byte
       TEXT 'HELLO WORLD'
       EVEN
**********************
TEST   LWPI MYWS
       CLR  R0            * 0 elements/no array
       LI   R1,1          * variable #1
       LI   R2,BUFFER     * our buffer, starting at length byte
       BLWP @>2010        * STRASG routine
       LWPI >83E0         *
       CLR  @>837C        * clear status and return
       B    @>0070        *
 
* Simpler test #2, use default entry WS
TEST2  CLR  R0
       LI   R1,1
       LI   R2,BUFFER
       BLWP @>2010       
       RT
 
       END