.org not returning
This commit is contained in:
parent
fd9a898ee0
commit
334518d6b6
2
FSHa.asm
2
FSHa.asm
|
|
@ -15,7 +15,7 @@ Setup:
|
||||||
|
|
||||||
CALL fshvarreset
|
CALL fshvarreset
|
||||||
|
|
||||||
call prgminstallload
|
;call prgminstallload
|
||||||
|
|
||||||
CALL drawstatusbar
|
CALL drawstatusbar
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ Fsh SHell is a compact command-line interface for TI-84 Plus CE calculators.
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
* Windows
|
* Windows
|
||||||
1. Download and install a linking program. <https://education.ti.com/ticonnectce> is ti's prepritory software.
|
1. Download and install a linking program. <https://education.ti.com/ticonnectce> is ti's proprietary software.
|
||||||
2. Plug in calculator and launch ti connect ce
|
2. Plug in calculator and launch ti connect ce
|
||||||
3. Drag and drop `bin\FSHa.8xp` to calculator
|
3. Drag and drop `bin\FSHa.8xp` to calculator
|
||||||
4. Done!
|
4. Done!
|
||||||
|
|
|
||||||
BIN
bin/FSHa.8xp
BIN
bin/FSHa.8xp
Binary file not shown.
7786
bin/FSHa.lst
7786
bin/FSHa.lst
File diff suppressed because it is too large
Load Diff
|
|
@ -1,23 +1,23 @@
|
||||||
prgmcmddecode:
|
prgmcmddecode:
|
||||||
decodecmdopt(prgmcmdPRGM, prgmcmdPRGMo)
|
;decodecmdopt(prgmcmdPRGM, prgmcmdPRGMo)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
prgmcmdroute:
|
prgmcmdroute:
|
||||||
pop bc
|
pop bc
|
||||||
routeoptjp(prgmcmdPRGMo, prgmcmdPRGMf)
|
;routeoptjp(prgmcmdPRGMo, prgmcmdPRGMf)
|
||||||
push bc
|
push bc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
prgmcmdmanroute:
|
prgmcmdmanroute:
|
||||||
pop bc
|
pop bc
|
||||||
routestrjp(prgmcmdPRGM, prgmcmdPRGMm)
|
;routestrjp(prgmcmdPRGM, prgmcmdPRGMm)
|
||||||
push bc
|
push bc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
prgmcmdmanrouteu:
|
prgmcmdmanrouteu:
|
||||||
pop bc
|
pop bc
|
||||||
routeustrjp(prgmcmdPRGM, prgmcmdPRGMu)
|
;routeustrjp(prgmcmdPRGM, prgmcmdPRGMu)
|
||||||
push bc
|
push bc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ FshVVars: .db "64w", 0
|
||||||
FshVMajor: .db "0", 0
|
FshVMajor: .db "0", 0
|
||||||
FshVMinor: .db "1", 0
|
FshVMinor: .db "1", 0
|
||||||
FshVPatch: .db "1", 0
|
FshVPatch: .db "1", 0
|
||||||
FshVBuild: .db "530", 0
|
FshVBuild: .db "600" ,0
|
||||||
FshVSeparator: .db ".", 0
|
FshVSeparator: .db ".", 0
|
||||||
FshMotd2nd: .db "Press 2nd for numbers", 0
|
FshMotd2nd: .db "Press 2nd for numbers", 0
|
||||||
FshMotdHelp: .db "Type 'HELP' for help", 0
|
FshMotdHelp: .db "Type 'HELP' for help", 0
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,4 @@
|
||||||
#define prgmloadersize prgmloaderend - prgmloader
|
#define prgmmovsize prgmmov_end - prgmmov_end
|
||||||
#define prgmunloadersize prgmunloaderend - prgmunloader
|
|
||||||
#define prgm_to_usermem_size prgm_to_usermem_end - prgm_to_usermem
|
|
||||||
prgmloaderloc equ SafeSScreen
|
|
||||||
prgmunloaderloc equ SafeSScreen + prgmloadersize
|
|
||||||
prgm_to_usermem_loc equ SafeSScreen + prgmloadersize + prgmunloadersize
|
|
||||||
|
|
||||||
|
|
||||||
prgmbasic:
|
prgmbasic:
|
||||||
|
|
||||||
|
|
@ -14,20 +8,12 @@ prgmasm:
|
||||||
call _RunIndicOn
|
call _RunIndicOn
|
||||||
call _APDSetup
|
call _APDSetup
|
||||||
call _EnableAPD
|
call _EnableAPD
|
||||||
jp prgmloaderloc
|
jp prgmloader
|
||||||
|
|
||||||
prgminstallload:
|
prgminstallload:
|
||||||
ld hl, prgmmov_start
|
ld hl, prgmmov_start
|
||||||
ld de, prgmloaderloc
|
ld de, SafeSScreen
|
||||||
ld bc, prgmloadersize
|
ld bc, prgmmovsize
|
||||||
ldir
|
|
||||||
ld hl, prgmmov_start + prgmloadersize
|
|
||||||
ld de, prgmunloaderloc
|
|
||||||
ld bc, prgmunloadersize
|
|
||||||
ldir
|
|
||||||
ld hl, prgmmov_start + prgmloadersize + prgmunloadersize
|
|
||||||
ld de, prgm_to_usermem_loc
|
|
||||||
ld bc, prgm_to_usermem_size
|
|
||||||
ldir
|
ldir
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
@ -38,14 +24,58 @@ prgmmov_start:
|
||||||
prgmmov:
|
prgmmov:
|
||||||
|
|
||||||
prgmloader:
|
prgmloader:
|
||||||
ld a, 's'
|
call prgm_del_usermem; now we deleted ourselves. cool.
|
||||||
call _PutC
|
|
||||||
call prgm_to_usermem_loc
|
call _boot_ClearVRAM
|
||||||
ld hl, prgmunloader
|
;ld a,$2D
|
||||||
|
;ld (mpLcdCtrl),a ; Set LCD to 16bpp
|
||||||
|
call _DrawStatusBar
|
||||||
|
;ld hl,(prgmNamePtr)
|
||||||
|
;call NamePtrToOP1
|
||||||
|
;bit isBasic,(iy+pgrmStatus)
|
||||||
|
;jp nz,RunBasicProgram
|
||||||
|
call prgm_to_usermem; the program is now stored at userMem -- Now we need to check and see what kind of file it is - C or assembly
|
||||||
push hl
|
push hl
|
||||||
set appAutoScroll,(iy + appflags)
|
ld hl, prgmunloader
|
||||||
jp userMem
|
call _PushErrorHandler
|
||||||
prgmloaderend:
|
ld de, prgmunloader
|
||||||
|
push de
|
||||||
|
jp UserMem ; simply call userMem to execute the program
|
||||||
|
|
||||||
|
RunBasicProgram:
|
||||||
|
call _RunIndicOn
|
||||||
|
call DeleteTempProgramGetName
|
||||||
|
;ld hl,(actualSizePrgm)
|
||||||
|
;push hl
|
||||||
|
;call _CreateProg ; create a temp program so we can execute
|
||||||
|
;inc de
|
||||||
|
;inc de
|
||||||
|
;pop bc
|
||||||
|
;call _ChkBCIs0
|
||||||
|
;jr z,InROM ; there's nothing to copy
|
||||||
|
;ld hl,(prgmDataPtr)
|
||||||
|
;ldi
|
||||||
|
;jp po,InROM
|
||||||
|
;ldir
|
||||||
|
InROM: call _OP4ToOP1
|
||||||
|
GoodInRAM:
|
||||||
|
;ld de,apperr1
|
||||||
|
;ld hl,StopError
|
||||||
|
;ld bc,StopErrorEnd-StopError
|
||||||
|
;ldir
|
||||||
|
;set graphdraw,(iy+graphFlags)
|
||||||
|
;ld hl,ErrCatchBASIC
|
||||||
|
;call _PushErrorHandler
|
||||||
|
;set progExecuting,(iy+newdispf)
|
||||||
|
;set allowProgTokens,(iy+newDispF)
|
||||||
|
;set cmdExec,(iy+cmdFlags);settheseflagsto execute BASIC prgm
|
||||||
|
;res onInterrupt,(iy+onflags)
|
||||||
|
;ld hl,ReturnHereBASIC
|
||||||
|
;push hl
|
||||||
|
;sub a,a
|
||||||
|
;ld (kbdGetKy),a
|
||||||
|
ei
|
||||||
|
jp _ParseInp ; run program
|
||||||
|
|
||||||
prgmunloader:
|
prgmunloader:
|
||||||
ld hl, prgmFsh
|
ld hl, prgmFsh
|
||||||
|
|
@ -53,46 +83,63 @@ prgmunloader:
|
||||||
call prgm_to_usermem
|
call prgm_to_usermem
|
||||||
call _RunIndicOff
|
call _RunIndicOff
|
||||||
jp Fin
|
jp Fin
|
||||||
prgmunloaderend:
|
|
||||||
|
|
||||||
prgm_to_usermem:
|
prgm_to_usermem:
|
||||||
ld a,$9 ; 'add hl,bc'
|
ld a, 09h ; 'add hl,bc'
|
||||||
ld (prgm_to_usermem.smc),a
|
ld (offset_SMC),a
|
||||||
call _ChkFindSym
|
call _ChkFindSym
|
||||||
call _ChkInRam
|
call _ChkInRam
|
||||||
ex de,hl
|
ex de,hl
|
||||||
jr z, prgm_to_usermem.in_ram
|
jr z,AlreadyInRAM
|
||||||
xor a,a
|
xor a,a
|
||||||
ld (prgm_to_usermem.smc),a
|
ld (offset_SMC),a
|
||||||
ld de,9
|
ld de,9
|
||||||
add hl,de
|
add hl,de
|
||||||
ld e,(hl)
|
ld e,(hl)
|
||||||
add hl,de
|
add hl,de
|
||||||
inc hl
|
inc hl
|
||||||
prgm_to_usermem.in_ram: ; hl -> size bytes
|
AlreadyInRAM: ; HL->totalPrgmSize bytes
|
||||||
call _LoadDEInd_s
|
call _LoadDEInd_s
|
||||||
inc hl
|
inc hl
|
||||||
inc hl ; bypass tExtTok, tAsm84CECmp
|
inc hl ; bypass bytes $EF,$7B (texttok,tasm84cecmp)
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ex de,hl
|
ex de,hl
|
||||||
call _ErrNotEnoughMem; check and see if we have enough memory
|
call _ErrNotEnoughMem; check and see if we have enough memory left for this operation
|
||||||
pop hl
|
pop hl
|
||||||
ld (asm_prgm_size),hl ; store the size of the program
|
ld (asm_prgm_size),hl; store the totalPrgmSize of the program to asm_prgm_size for later use
|
||||||
ld de,userMem
|
ld de,userMem
|
||||||
push de
|
push de
|
||||||
call _InsertMem; insert memory into usermem
|
call _InsertMem ; insert memory into the userspace
|
||||||
pop de
|
pop de
|
||||||
pop hl ; hl -> start of program
|
pop hl ; HL->start of program
|
||||||
ld bc,(asm_prgm_size) ; load size of current program
|
ld bc,(asm_prgm_size) ; load totalPrgmSize of current program
|
||||||
prgm_to_usermem.smc equ $
|
offset_SMC:
|
||||||
add hl,bc ; if not in ram smc it so it doesn't execute
|
add hl,bc ; if in ram, do this; otherwise, smc it so it doesn't execute
|
||||||
ldir ; copy the program to userMem
|
ldir ; copy the program to userMem
|
||||||
ret
|
ret ; return
|
||||||
prgm_to_usermem_end:
|
|
||||||
|
prgm_del_usermem:
|
||||||
|
ld de,(asm_prgm_size) ; load total program totalPrgmSize
|
||||||
|
or a,a
|
||||||
|
sbc hl,hl
|
||||||
|
ld (asm_prgm_size),hl ; delete whatever current program was there
|
||||||
|
ld hl,userMem
|
||||||
|
jp _DelMem ; HL->place to delete, DE=amount to delete
|
||||||
|
|
||||||
|
DeleteTempProgramGetName:
|
||||||
|
ld hl,tmpPrgmName
|
||||||
|
call _Mov9ToOP1
|
||||||
|
call _PushOP1
|
||||||
|
call _ChkFindSym
|
||||||
|
call nc,_DelVarArc ; delete the temp prgm if it exists
|
||||||
|
jp _PopOP1
|
||||||
|
|
||||||
|
tmpPrgmName: .db tempProgObj,"ZTGP",0
|
||||||
|
|
||||||
prgmFsh: .db ProgObj, "FSHA", 0
|
prgmFsh: .db ProgObj, "FSHA", 0
|
||||||
|
|
||||||
prgmmov_end:
|
prgmmov_end:
|
||||||
|
|
||||||
.org prgmmov_start
|
.org prgmmov_start
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue