Please enable JavaScript to view this site.

A-Shell Development History

Navigation: Version 4.6, builds 699-791

746 — 11 September 2000

Scroll Prev Top Next More

1. Implement a method of writing XCALL subroutines in BASIC:

 

A. Include XCALL.BSI at the top of your program.

 

B. Change the RUN extension to SBX. (SBX was chosen rather than SBR to eliminate the possibility of you confusing your AMOS SBR's  with A-Shell SBR's when distributing your application.) The  search path for SBX files is the same as that for Basic (current [p,pn], [p,0], DSK0:[7,6].)

 

C. The XCALL.BSI will assign XCBCNT to the number of parameters which were passed, and set up a structure XCBSTRUCT(20) containing the type and size of each of the passed params. (See XCALL.BSI for the parameter names and layout.) You may not want to use this information in your routine.

 

D. To retrieve an individual parameter, use this xcall:

 

 XCALL MIAMEX,MX'XCBDATA,XCBADR,XCBGET,,

 

The first parm# is 1 (not 0.) The you use should be reasonably compatible with the actual variable type passed to the subroutine, although appropriate conversions and truncations will be applied if necessary.

 

E. To return an updated parameter, use this xcall:

 

 XCALL MIAMEX,MX'XCBDATA,XCBADR,XCBPUT,,

 

See the comments under (D) aove regarding the parm# and variable parameters.

 

F. The default amount of memory available to such SBR's is 128K.  If you need more, or can get by with a lot less, add a second  parameter to the MEMORY= statement in the miame.ini, e.g.:

 

 MEMORY=512K,256K

 

In the above case, the 256K specifies the amount of memory to be made available to programs running as xcall subroutines.

 

G. XCALL routines written in Basic can call other XCALLs (which should be obvious from the above points D and E), and it doesn't matter if those XCALLs are themselves written in C or Basic. If you nest them too deeply though, you will eventually run out of stack space.

 

See the sample subroutine SBXSAM (BAS,SBX) and sample test program SBXTST in the sample directory, 7,376.

 

2. A minor problem in EZTYP in which it was not displaying the last line of a file if there was no line terminator on it was fixed.

 

3. Fix a bug in XINPUT/ZINPUT in which minus signs were erroneously allowed.