Tutorial 22
Porting

What is Porting?
    Porting, in our case, is the act of converting TI-83 Plus Asm code to TI-83 Asm, and vice versa.

Porting - TI-83 > TI-83 Plus
    Let's say you wanted to port the Asm source code of a TI-83 program, to TI-83 Plus Asm source. To do so, you must change some things.

1. You must include an include file that defines ROM calls for the TI-83 Plus.
2. You must change a call macros in the source that are calling ROM calls to B_CALL.
3. Change the program start address from 9327h to 9D95h.


Porting - TI-83 Plus > TI-83
To port a TI-83 Plus Asm program to TI-83 Asm code, do the following:

1. Change all B_CALL macros to call and do not enclose the ROM call in parentheses.
2. Include the ti83asm and the tokens include files instead of the ti83PlusAsm include file.
3. Change the program start from 9D95h to 9327h.
4. Make sure the TI-83 Plus program does not use SafeRAM areas the TI-83 doesn't have.


Example
In this example, I'm converting TI-83 source to TI-83 Plus source.

TI-83 Source:

.NOLIST ; Defines area which isn't code.
#define end .end
#define END .end
#define equ .equ
#define EQU .equ
#include "ti83asm.inc"
#include "tokens.inc"
.LIST ; Defines area which IS code.

.org 9327h

call _clrLCDFull

ret

.end
END


Here's the TI-83 Plus source after porting:

.NOLIST ; Defines area which isn't code.
#define end .end
#define END .end
#define equ .equ
#define EQU .equ
#include "ti83PlusAsm.inc"
.LIST ; Defines area which IS code.

.org 9D95h

B_CALL( _clrLCDFull)

ret

.end
END


Conclusion
    Now that you know this, you can port your favorite TI-83 Games (Programs) to TI-83 Plus Asm and vice versa. Assuming you have the source code of course.

Tutorial 23

    Click to return to the site's menu... or here to get back to the tutorial's menu.