Jump to content
IGNORED

GPLLNK equate for XB


moulinaie

Recommended Posts

Rich,

 

The tagged-object loader in the XB cart is a 'reduced functionality' version of the EA tagged object loader. Unfortunately, it doesn't support the REF tag, so it cannot resolve REFd addresses in your assembler source code. It does support the DEF directive (necessary for CALL LINK) which means your only choice is to give the address yourself, which of course means that you need to know it first, in order to specify it as a DEF directive in your source code!

 

Unfortunately Guillame, I do not know the address of GPLLNK in the XB environment, but if you check out the July 1986 edition of the Smart Programmer, you will find a version of GPLLNK listed that you can use. It's not a very large program (70 bytes) and is fully compatible with MiniMem, EA, XB etc. I have posted the magazine below. You need the paper port viewer to view the file, which you can download (free) from here: ftp://ftp.scansoft.c...ort/setupex.exe

 

You may also have the same trouble with XMLLNK. You will want to use XMLLNK if you want to do any floating point math. For XMLLNK you can use the following code, which should work just fine.

 

GPLLNK  BSS 32		  * workspace for gpllnk
	DATA LNKGPL	 * address of code
	
LNKGPL  MOV *R11+,@>83E2 * move XML opcode to GPLs R1
	MOV @>83F6,R0   * save GPLs R11
	LWPI >83E0	  * load GPL workspace
	MOV R1,R2	   * copy opcode
	SRL R1,12	   * get table number
	SLA R1,1		* convert to word offset
	SLA R2,4		* remove table number from copy
	SRL R2,11	   * get the index into the table
	A @>0CFA(R1),R2 * get address of pointer
	MOV *R2,R2	  * get address of code from pointer
	BL *R2		  * branch to the code
	LWPI GPLLNK	 * restore our workspace
	MOV R0,@>83F6   * restore GPLs R11
   RTWP

 

Hope this helps.

 

Mark

sp8607.zip

Link to comment
Share on other sites

Rich,

 

The tagged-object loader in the XB cart is a 'reduced functionality' version of the EA tagged object loader. Unfortunately, it doesn't support the REF tag, so it cannot resolve REFd addresses in your assembler source code. It does support the DEF directive (necessary for CALL LINK) which means your only choice is to give the address yourself, which of course means that you need to know it first, in order to specify it as a DEF directive in your source code!

 

Unfortunately Guillame, I do not know the address of GPLLNK in the XB environment, but if you check out the July 1986 edition of the Smart Programmer, you will find a version of GPLLNK listed that you can use. It's not a very large program (70 bytes) and is fully compatible with MiniMem, EA, XB etc. I have posted the magazine below. You need the paper port viewer to view the file, which you can download (free) from here: ftp://ftp.scansoft.c...ort/setupex.exe

 

Yeah, this helps a lot!

I'm adding the floating point instructions to MLC, so I needed the GPLLNK to get scientific functions.

 

 

You may also have the same trouble with XMLLNK. You will want to use XMLLNK if you want to do any floating point math. For XMLLNK you can use the following code, which should work just fine.

 

No, XMLLNK works fine directly. The E/A manual gives the new equates to use. I could perform arithmetics with no problem.

 

Thanks a lot Mark, you saved me!

 

Guillaume.

Link to comment
Share on other sites

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...