151 lines
2.8 KiB
ArmAsm
151 lines
2.8 KiB
ArmAsm
.global _casio_GetKey
|
|
.global _casio_PrintMini
|
|
.global _casio_Bdisp_PutDisp_DD
|
|
.global _casio_Bdisp_AllClr_VRAM
|
|
.global _casio_Bdisp_DrawLine_VRAM
|
|
.global _casio_Bdisp_AreaReverseVRAM
|
|
.global _casio_Bdisp_AreaClr_VRAM
|
|
.global _casio_RestoreDisp
|
|
.global _casio_SaveDisp
|
|
.global _casio_Malloc
|
|
.global _casio_Free
|
|
|
|
.type _casio_GetKey, @function
|
|
.type _casio_PrintMini, @function
|
|
.type _casio_Bdisp_PutDisp_DD, @function
|
|
.type _casio_Bdisp_AllClr_VRAM, @function
|
|
.type _casio_Bdisp_DrawLine_VRAM, @function
|
|
.type _casio_Bdisp_AreaReverseVRAM, @function
|
|
.type _casio_Bdisp_AreaClr_VRAM, @function
|
|
.type _casio_RestoreDisp, @function
|
|
.type _casio_SaveDisp, @function
|
|
.type _casio_Malloc, @function
|
|
.type _casio_Free, @function
|
|
|
|
|
|
.global _casio_Bfile_CreateFile
|
|
.global _casio_Bfile_OpenFile
|
|
.global _casio_Bfile_ReadFile
|
|
.global _casio_Bfile_WriteFile
|
|
.global _casio_Bfile_CloseFile
|
|
|
|
.type _casio_Bfile_CreateFile, @function
|
|
.type _casio_Bfile_OpenFile, @function
|
|
.type _casio_Bfile_ReadFile, @function
|
|
.type _casio_Bfile_WriteFile, @function
|
|
.type _casio_Bfile_CloseFile, @function
|
|
|
|
#define syscall_(id, syscall_table) \
|
|
mov.l syscall_table, r2 ;\
|
|
mov.l 1f, r0 ;\
|
|
jmp @r2 ;\
|
|
nop ;\
|
|
.align 4 ;\
|
|
1: .long id
|
|
|
|
#define syscall(id) syscall_(id, syscall_table)
|
|
|
|
|
|
|
|
#ifdef FX9860G
|
|
|
|
_casio_GetKey:
|
|
syscall(0x90f)
|
|
|
|
_casio_PrintMini:
|
|
syscall(0xc4f)
|
|
|
|
_casio_Bdisp_AllClr_VRAM:
|
|
syscall(0x143)
|
|
_casio_Bdisp_PutDisp_DD:
|
|
syscall(0x028)
|
|
_casio_Bdisp_DrawLine_VRAM:
|
|
syscall(0x030)
|
|
_casio_Bdisp_AreaClr_VRAM:
|
|
syscall(0x14b)
|
|
_casio_Bdisp_AreaReverseVRAM:
|
|
syscall(0x14d)
|
|
|
|
_casio_Malloc:
|
|
syscall(0xacd)
|
|
_casio_Free:
|
|
syscall(0xacc)
|
|
|
|
_casio_Bfile_CreateFile:
|
|
syscall(0x434)
|
|
_casio_Bfile_OpenFile:
|
|
syscall(0x42c)
|
|
_casio_Bfile_WriteFile:
|
|
syscall(0x435)
|
|
_casio_Bfile_ReadFile:
|
|
syscall(0x432)
|
|
_casio_Bfile_CloseFile:
|
|
syscall(0x42d)
|
|
|
|
syscall_table:
|
|
.long 0x80010070
|
|
#endif /* FXCG9860G */
|
|
|
|
|
|
#ifdef FXCG50
|
|
|
|
_casio_GetKey:
|
|
syscall(0x0eab)
|
|
|
|
_casio_PrintMini:
|
|
sts.l pr, @-r15
|
|
|
|
! fxcg50 prototype:
|
|
! void PrintMinit(int *x, int *y, void *str, int mode, int color, int mode2)
|
|
mov.l r4, @-r15
|
|
mov r15, r4 ! x position
|
|
mov.l r5, @-r15
|
|
mov r15, r5 ! y posiition
|
|
mov #0, r7 ! mode
|
|
mov #0, r0 ! color
|
|
mov #0, r1 ! mode2
|
|
mov.l r0, @-r15
|
|
mov.l r1, @-r15
|
|
|
|
! syscall
|
|
mov.l syscall_table, r2
|
|
mov.l 1f, r0
|
|
jsr @r2
|
|
nop
|
|
|
|
! restore stack
|
|
add #16, r15
|
|
lds.l @r15+, pr
|
|
rts
|
|
nop
|
|
.align 4
|
|
1: .long 0x021b
|
|
|
|
_casio_Bdisp_AllClr_VRAM:
|
|
syscall(0x272)
|
|
_casio_Bdisp_PutDisp_DD:
|
|
syscall(0x025f)
|
|
|
|
_casio_Bfile_CreateFile:
|
|
syscall(0x1dae)
|
|
_casio_Bfile_OpenFile:
|
|
mov #0, r6
|
|
syscall(0x1da3)
|
|
_casio_Bfile_CloseFile:
|
|
syscall(0x1da4)
|
|
_casio_Bfile_WriteFile:
|
|
syscall(0x1daf)
|
|
_casio_Bfile_ReadFile:
|
|
syscall(0x1dac)
|
|
|
|
_casio_Malloc:
|
|
syscall(0x1f44)
|
|
_casio_Free:
|
|
syscall(0x1f42)
|
|
|
|
syscall_table:
|
|
.long 0x80020070
|
|
|
|
#endif /* FXCG50 */
|
|
.end
|