Jump to content

Recommended Posts

Hello,

 

In order to add SPEECH to MLC, I need a bloc of 16 bytes free into the 16-bits ram located at >8300. (the famous "readit" routine)

MLC runs under TI Extended Basic environment !

 

I only need this space during the execution of one instruction, then it will be free again.

What zone should I use?

 

Is it OK to use the GPL workspace between two GPL calls?

 

Guillaume.

Link to comment
https://forums.atariage.com/topic/191676-16-bytes-in-8300-wanted/
Share on other sites

How about the XB workspace at >83E0 ? R0 to R7 or R8 to R15 (or any 8 consecutive registers) represent 16-bytes of RAM... Look on page 404 of the E/A manual, particularly the areas from >8300 to >8349, >834A to >836D, and >836E to >836F.

I'm using >8348 - but I don't know if it is compatible with XB.

 

However, you don't need 16 bytes. You need 12 (including somewhere in 16 bit memory to hold the value read from the synth).

>8348	 movb @spchrd,@spdata  ; read from speech synth
>834e	 src r0,12  ; wait 12us (e/a page 349)
>8350	 rt
>8352  spdata bss 2

 

This can be reduced to 6 bytes if you use indirect addressing. If you do it that way, you would load, say, R0 with the address of spchrd and then branch to the read routine in pad ram. This should work, as long as your register workspace is in pad ram.

 

So, first (in 8 bit ram)

li r0,spchrd ; address of speech synth read register (>9000)
bl @readit

 

Then in pad (16-bit) ram:

readit
>8348	 movb *r0,r1  ; read from speech synth
>834a	 src r0,12  ; wait 12us (e/a page 349)
>834c	 rt

I'm using >8348 - but I don't know if it is compatible with XB.

 

However, you don't need 16 bytes. You need 12 (including somewhere in 16 bit memory to hold the value read from the synth).

>8348	 movb @spchrd,@spdata  ; read from speech synth
>834e	 src r0,12  ; wait 12us (e/a page 349)
>8350	 rt
>8352  spdata bss 2

 

 

The problem is that my workspace register is in 8bits RAM!

And if I use src r0,12, then it wil access the 8-bit ram, but this can't be done!

 

I can't put my workspace in 16bits ram as my program collaborates with XB and there are very few bytes free...

 

Guillaume.

How about the XB workspace at >83E0 ? R0 to R7 or R8 to R15 (or any 8 consecutive registers) represent 16-bytes of RAM... Look on page 404 of the E/A manual, particularly the areas from >8300 to >8349, >834A to >836D, and >836E to >836F.

 

The fact is that I don't know if the XB expects to find back some values in its registers when returning. So I don't want to use some sensible bytes.

I read the manual and it is not totally correct:

Its says that >8300 to >830F is free, but it's wrong! When you use CALL LINK with parameters in XB, that's exactly where are stored the type of each argument in the parameter list.

 

Guillaume.

Sure you can! Just copy gpl workspace to RAM, use it, and restore it afterwards. Make sure interrupts are switched off though!

 

To speed up things, that was what I wanted to avoid: copy and restore.

But if it's the only way...

 

Guillaume.

The fact is that I don't know if the XB expects to find back some values in its registers when returning. So I don't want to use some sensible bytes.

I read the manual and it is not totally correct:

Its says that >8300 to >830F is free, but it's wrong! When you use CALL LINK with parameters in XB, that's exactly where are stored the type of each argument in the parameter list.

 

Guillaume.

 

The information you cited is for TI BASIC (TIB), not TI Extended BASIC (XB). On p. 418 of the E/A manual, you will see that XB's CALL LINK includes the area you indicated as unavailable in the area it uses at >8300 to >8315 for the same CALL LINK info that TIB uses at >8310 to >8312---apparently, XB needs 3 more bytes than TIB.

 

I should think you could use the area for the FAC beginning at >834A as long as floating point routines are not currently executing.

 

...lee

I should think you could use the area for the FAC beginning at >834A as long as floating point routines are not currently executing.

 

...lee

 

Well, that's a good solution even without touching at FAC and ARG, there are two blocs of ten bytes left.

I will try that...

Thanks a lot to everyone for your help!

 

Guillaume.

FAC continues into ARG in XB. i.e.

 

0125]			   ***********************************************************
[0126]			   *	Permanent workspace variables
[0127] 8318		  STRSP  EQU  >8318			String space begining
[0128] 831A		  STREND EQU  >831A			String space ending
[0129] 831C		  SREF   EQU  >831C			Temporary string pointer

99/4 GPL-ASSEMBLER (Pass 3) correct								   PAGE 0003
EQUATES EDIT-359
[0130] 831E		  SMTSRT EQU  >831E			Start of current statement
[0131] 8320		  VARW   EQU  >8320			Screen address
[0132] 8322		  ERRCOD EQU  >8322			Return error code from ALC
[0133] 8324		  STVSPT EQU  >8324			Value-stack base
[0134] 832A		  VARA   EQU  >832A			Ending display location
[0135] 832C		  PGMPTR EQU  >832C			Program text pointer
[0136] 832E		  EXTRAM EQU  >832E			Line number table pointer
[0137] 8330		  STLN   EQU  >8330			Start of line number table
[0138] 8332		  ENLN   EQU  >8332			End of line number table
[0139] 8334		  DATA   EQU  >8334			Data pointer for READ
[0140] 8336		  LNBUF  EQU  >8336			Line table pointer for READ
[0141] 8338		  INTRIN EQU  >8338			Add of intrinsic poly constant
[0142] 833A		  SUBTAB EQU  >833A			Subprogram symbol table
[0143] 833C		  IOSTRT EQU  >833C			PAB list/Start of I/O chain
[0144] 833E		  SYMTAB EQU  >833E			Symbol table pointer
[0145] 8340		  FREPTR EQU  >8340			Free space pointer
[0146] 8342		  CHAT   EQU  >8342			Current charater/token
[0147] 8343		  BASE   EQU  >8343			OPTION BASE value
[0148] 8344		  PRGFLG EQU  >8344			Program/imperative flag
[0149] 8345		  FLAG   EQU  >8345			General 8-bit flag
[0150] 8346		  BUFLEV EQU  >8346			Crunch-buffer destruction leve
[0151] 8348		  LSUBP  EQU  >8348			Last subprogram block on stack
[0152]			   * FAC  EQU  >834A			Floating-point ACcurmulator
[0153] 834B		  FAC1   EQU  FAC+1
[0154] 834C		  FAC2   EQU  FAC+2
[0155] 834D		  FAC3   EQU  FAC+3
[0156] 834E		  FAC4   EQU  FAC+4
[0157] 834F		  FAC5   EQU  FAC+5
[0158] 8350		  FAC6   EQU  FAC+6
[0159] 8351		  FAC7   EQU  FAC+7
[0160] 8352		  FAC8   EQU  FAC+8
[0161] 8353		  FAC9   EQU  FAC+9
[0162] 8354		  FAC10  EQU  FAC+10
[0163] 8355		  FAC11  EQU  FAC+11
[0164] 8356		  FAC12  EQU  FAC+12
[0165] 8357		  FAC13  EQU  FAC+13
[0166] 8358		  FAC14  EQU  FAC+14
[0167] 8359		  FAC15  EQU  FAC+15
[0168] 835A		  FAC16  EQU  FAC+16
[0169] 835B		  FAC17  EQU  FAC+17
[0170] 834C		  AAA	EQU  FAC+2
[0171] 834E		  CCC	EQU  FAC+4
[0172] 8350		  BBB	EQU  FAC+6
[0173] 834C		  DDD	EQU  FAC+2
[0174] 834E		  FFF	EQU  FAC+4
[0175] 8350		  EEE	EQU  FAC+6
[0176] 8354		  DDD1   EQU  FAC+10
[0177] 8356		  FFF1   EQU  FAC+12
[0178] 8358		  EEE1   EQU  FAC+14
[0179]			   * ARG  EQU  >835C			 Floating-point ARGument
[0180] 835D		  ARG1   EQU  ARG+1
[0181] 835E		  ARG2   EQU  ARG+2
[0182] 835F		  ARG3   EQU  ARG+3
[0183] 8360		  ARG4   EQU  ARG+4
[0184] 8361		  ARG5   EQU  ARG+5
[0185] 8362		  ARG6   EQU  ARG+6
[0186] 8363		  ARG7   EQU  ARG+7
[0187] 8364		  ARG8   EQU  ARG+8
[0188] 8364		  XSTLN  EQU  >8364			GKXB variable
[0189] 8366		  XENLN  EQU  >8366			GKXB variable
[0190] 8367		  ARG11  EQU  ARG+11
[0191] 8368		  XCURLI EQU  >8368			GKXB variable
[0192] 836A		  XCURIN EQU  >836A			GKXB variable
[0193] 836B		  ARG15  EQU  ARG+15

99/4 GPL-ASSEMBLER (Pass 3) correct								   PAGE 0004
EQUATES EDIT-359
[0194] 836C		  ARG16  EQU  ARG+16
[0195]			   * VSPTR  EQU  >836E		  Value stack pointer
[0196] 8376		  EXPZ   EQU  >8376			Exponent in floating-point
[0197] 8384		  RAMTOP EQU  >8384			Highest address in ERAM
[0198] 8386		  RAMFRE EQU  >8386			Free pointer in the ERAM
[0199] 8388		  RSTK   EQU  >8388			Subroutine stack base
[0200] 8389		  RAMFLG EQU  >8389			ERAM flag
[0201] 83AF		  STKMIN EQU  >83AF			Base of data stack
[0202] 83BD		  STKMAX EQU  >83BD			Top of data stack
[0203] 83CE		  PRTNFN EQU  >83CE

 

This is the EQU for source code of XB and FAC leading into ARG is never assumed to remain so you have 34 bytes avaliable all the time.

Edited by RXB

Hello,

 

In order to add SPEECH to MLC, I need a bloc of 16 bytes free into the 16-bits ram located at >8300. (the famous "readit" routine)

MLC runs under TI Extended Basic environment !

 

I only need this space during the execution of one instruction, then it will be free again.

What zone should I use?

 

Is it OK to use the GPL workspace between two GPL calls?

 

Guillaume.

 

Pardon my ignorance. Why does it have to be in scratch pad ?

Pardon my ignorance. Why does it have to be in scratch pad ?

 

 

Page 349 in the E/A-manual:

 

 

During the delay after a read, the 8-bit peripheral bus which is connected to the

Memory Expansion unit cannot be used. Therefore, the reads of data from the

Speech Synthesizer and the delays must be in the area accessed by the 16-bit bus.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...