.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 prgminstallload
|
||||
;call prgminstallload
|
||||
|
||||
CALL drawstatusbar
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Fsh SHell is a compact command-line interface for TI-84 Plus CE calculators.
|
|||
|
||||
## Installing
|
||||
* 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
|
||||
3. Drag and drop `bin\FSHa.8xp` to calculator
|
||||
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:
|
||||
decodecmdopt(prgmcmdPRGM, prgmcmdPRGMo)
|
||||
;decodecmdopt(prgmcmdPRGM, prgmcmdPRGMo)
|
||||
ret
|
||||
|
||||
prgmcmdroute:
|
||||
pop bc
|
||||
routeoptjp(prgmcmdPRGMo, prgmcmdPRGMf)
|
||||
;routeoptjp(prgmcmdPRGMo, prgmcmdPRGMf)
|
||||
push bc
|
||||
ret
|
||||
|
||||
prgmcmdmanroute:
|
||||
pop bc
|
||||
routestrjp(prgmcmdPRGM, prgmcmdPRGMm)
|
||||
;routestrjp(prgmcmdPRGM, prgmcmdPRGMm)
|
||||
push bc
|
||||
ret
|
||||
|
||||
|
||||
prgmcmdmanrouteu:
|
||||
pop bc
|
||||
routeustrjp(prgmcmdPRGM, prgmcmdPRGMu)
|
||||
;routeustrjp(prgmcmdPRGM, prgmcmdPRGMu)
|
||||
push bc
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ FshVVars: .db "64w", 0
|
|||
FshVMajor: .db "0", 0
|
||||
FshVMinor: .db "1", 0
|
||||
FshVPatch: .db "1", 0
|
||||
FshVBuild: .db "530", 0
|
||||
FshVBuild: .db "600" ,0
|
||||
FshVSeparator: .db ".", 0
|
||||
FshMotd2nd: .db "Press 2nd for numbers", 0
|
||||
FshMotdHelp: .db "Type 'HELP' for help", 0
|
||||
|
|
|
|||
|
|
@ -1,10 +1,4 @@
|
|||
#define prgmloadersize prgmloaderend - prgmloader
|
||||
#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
|
||||
|
||||
#define prgmmovsize prgmmov_end - prgmmov_end
|
||||
|
||||
prgmbasic:
|
||||
|
||||
|
|
@ -14,20 +8,12 @@ prgmasm:
|
|||
call _RunIndicOn
|
||||
call _APDSetup
|
||||
call _EnableAPD
|
||||
jp prgmloaderloc
|
||||
jp prgmloader
|
||||
|
||||
prgminstallload:
|
||||
ld hl, prgmmov_start
|
||||
ld de, prgmloaderloc
|
||||
ld bc, prgmloadersize
|
||||
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
|
||||
ld de, SafeSScreen
|
||||
ld bc, prgmmovsize
|
||||
ldir
|
||||
ret
|
||||
|
||||
|
|
@ -38,14 +24,58 @@ prgmmov_start:
|
|||
prgmmov:
|
||||
|
||||
prgmloader:
|
||||
ld a, 's'
|
||||
call _PutC
|
||||
call prgm_to_usermem_loc
|
||||
ld hl, prgmunloader
|
||||
call prgm_del_usermem; now we deleted ourselves. cool.
|
||||
|
||||
call _boot_ClearVRAM
|
||||
;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
|
||||
set appAutoScroll,(iy + appflags)
|
||||
jp userMem
|
||||
prgmloaderend:
|
||||
ld hl, prgmunloader
|
||||
call _PushErrorHandler
|
||||
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:
|
||||
ld hl, prgmFsh
|
||||
|
|
@ -53,46 +83,63 @@ prgmunloader:
|
|||
call prgm_to_usermem
|
||||
call _RunIndicOff
|
||||
jp Fin
|
||||
prgmunloaderend:
|
||||
|
||||
prgm_to_usermem:
|
||||
ld a,$9 ; 'add hl,bc'
|
||||
ld (prgm_to_usermem.smc),a
|
||||
ld a, 09h ; 'add hl,bc'
|
||||
ld (offset_SMC),a
|
||||
call _ChkFindSym
|
||||
call _ChkInRam
|
||||
ex de,hl
|
||||
jr z, prgm_to_usermem.in_ram
|
||||
jr z,AlreadyInRAM
|
||||
xor a,a
|
||||
ld (prgm_to_usermem.smc),a
|
||||
ld (offset_SMC),a
|
||||
ld de,9
|
||||
add hl,de
|
||||
ld e,(hl)
|
||||
add hl,de
|
||||
inc hl
|
||||
prgm_to_usermem.in_ram: ; hl -> size bytes
|
||||
AlreadyInRAM: ; HL->totalPrgmSize bytes
|
||||
call _LoadDEInd_s
|
||||
inc hl
|
||||
inc hl ; bypass tExtTok, tAsm84CECmp
|
||||
inc hl ; bypass bytes $EF,$7B (texttok,tasm84cecmp)
|
||||
push hl
|
||||
push de
|
||||
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
|
||||
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
|
||||
push de
|
||||
call _InsertMem; insert memory into usermem
|
||||
call _InsertMem ; insert memory into the userspace
|
||||
pop de
|
||||
pop hl ; hl -> start of program
|
||||
ld bc,(asm_prgm_size) ; load size of current program
|
||||
prgm_to_usermem.smc equ $
|
||||
add hl,bc ; if not in ram smc it so it doesn't execute
|
||||
pop hl ; HL->start of program
|
||||
ld bc,(asm_prgm_size) ; load totalPrgmSize of current program
|
||||
offset_SMC:
|
||||
add hl,bc ; if in ram, do this; otherwise, smc it so it doesn't execute
|
||||
ldir ; copy the program to userMem
|
||||
ret
|
||||
prgm_to_usermem_end:
|
||||
ret ; return
|
||||
|
||||
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
|
||||
|
||||
prgmmov_end:
|
||||
|
||||
.org prgmmov_start
|
||||
.org prgmmov_start
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue