📄 spp_dev_a.xap
字号:
MODULE crt0 .LARGE ; Not really, but we need the space for DEBUG; Define the segment layout .SEG VAREND .PACK {INIT, VAR, VAREND}, {H'400, H'800} .PACK {CONST, INITC}, {H'7400, H'D400}; This segment holds stabs debug info and doesn't make it onto bluecore .CSEG DEBUG ORG H'10000; Put labels at selected positions so; we can deduce segment size and placement .SEG INITINIT: .SEG VARVAR: .SEG VARENDVAREND: .SEG CONSTCONST: .SEG INITCINITC:$XAP_AH EQU H'ffe0$XAP_AL EQU H'ffe1$XAP_UXL EQU H'ffe2$XAP_UY EQU H'ffe3; Put the version number at the start of the CONST segment .SEG CONST DC 1541 ; updated by Makefile from syscalls; ****************************************************************************; Startup code; **************************************************************************** .CODE ORG H'0000 ld al,#VAR-INIT ; Size of INIT segment ld ah,#INIT ld x,#INITC bc2 ; AL is now zero ld ah,#VAREND-VAR ; Size of BSS segment beq skip_zero ld x,#VARloop_zero: st al,@(0,x) add x,#1 sub ah,#1 bne loop_zeroskip_zero: ; call init code, normally empty bsr $__init ld ah,#0 ld al,#0 bsr $_main ; Main may exit by returning or by explicitly calling $exit. ; In either case exit code will be in AH ; Note 'real' programs are unlikely to exit. bra $_exit$_abort: ; Exit abnormally ld ah,#1 bra $_exit_exit EQU $_exit ENDMOD MODULE calloc .LARGE ; really small mode but we need space for debug symbols; GNU C version 3.3.3 (BlueLab 3.6.2-release); compiled by GNU C version 3.2.3 (mingw special 20030504-1).;# options passed: ;# -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/include;# -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/lib/gcc-lib/xap-local-xap/3.3.3/install-tools/include;# -I. -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/include;# -iprefix -isystem -D__GNUC__=3 -D__GNUC_MINOR__=3;# -D__GNUC_PATCHLEVEL__=3 -MD -MQ -mno-leaf-optim -ansi -auxbase-strip -g;# -g -O -pedantic -Wall -Wmissing-prototypes -Wstrict-prototypes;# -Wsign-compare -Wredundant-decls -Werror -Wall -W -Wmissing-prototypes;# -Wstrict-prototypes -Wsign-compare -Wredundant-decls -Werror -ansi;# -fno-builtin-memcpy;# options enabled: -fdefer-pop -fthread-jumps -fpeephole -ffunction-cse;# -fkeep-static-consts -fpcc-struct-return -fgcse-lm -fgcse-sm;# -floop-optimize -fcrossjumping -fif-conversion -fif-conversion2;# -fsched-interblock -fsched-spec -fbranch-count-reg -fcprop-registers;# -fcommon -fgnu-linker -fargument-alias -fmerge-constants;# -fzero-initialized-in-bss -fleading-underscore -fident;# -fguess-branch-probability -fmath-errno -ftrapping-math -mpeephole;# -mquiet-mode -minline-block-copy-mode -menhanced-mode -mload-cache-mode;# -mbitfield-mode -mtest4 .ENHANCED;# begin scan referenced symbols;#(clobber:QI (reg:QI 0 AH));# import $_malloc;# import $_memset;# end scan referenced symbols .CODE$_calloc: enter #4?LBB_calloc: ld X,@$XAP_AL?LBB2: ld AL,@$XAP_AH smult @$XAP_UXL st AL,@(H'0002,Y) ld AH,@$XAP_AL; bsr $_malloc DC ((256*3)+9) st AH,@(H'0001,Y) cmp AH,#H'0000 beq ?L2 ld AL,@(H'0002,Y) st AL,@(0,Y) ld AL,#H'0000 bsr $_memset?L2:?LBE2: ld AH,@(H'0001,Y)?LBE_calloc: leave #4;.stabn 192,0,0,?LBB2;.stabn 224,0,0,?LBE2 ENDMOD;# Function pattern *movqi2 used[0] = 6 used[1] = 1 total = 7;# Function pattern *movqi3 used[0] = 2 total = 2;# Function pattern *mulqi3 used[0] = 1 total = 1;# Function pattern *call_value1 used[0] = 2 total = 2;# Function pattern movstrqi+3 used[0] = 1 total = 1 MODULE memcpy .LARGE ; really small mode but we need space for debug symbols; GNU C version 3.3.3 (BlueLab 3.6.2-release); compiled by GNU C version 3.2.3 (mingw special 20030504-1).;# options passed: ;# -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/include;# -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/lib/gcc-lib/xap-local-xap/3.3.3/install-tools/include;# -I. -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/include;# -iprefix -isystem -D__GNUC__=3 -D__GNUC_MINOR__=3;# -D__GNUC_PATCHLEVEL__=3 -MD -MQ -mno-leaf-optim -ansi -auxbase-strip -g;# -g -O -pedantic -Wall -Wmissing-prototypes -Wstrict-prototypes;# -Wsign-compare -Wredundant-decls -Werror -Wall -W -Wmissing-prototypes;# -Wstrict-prototypes -Wsign-compare -Wredundant-decls -Werror -ansi;# -fno-builtin-memcpy;# options enabled: -fdefer-pop -fthread-jumps -fpeephole -ffunction-cse;# -fkeep-static-consts -fpcc-struct-return -fgcse-lm -fgcse-sm;# -floop-optimize -fcrossjumping -fif-conversion -fif-conversion2;# -fsched-interblock -fsched-spec -fbranch-count-reg -fcprop-registers;# -fcommon -fgnu-linker -fargument-alias -fmerge-constants;# -fzero-initialized-in-bss -fleading-underscore -fident;# -fguess-branch-probability -fmath-errno -ftrapping-math -mpeephole;# -mquiet-mode -minline-block-copy-mode -menhanced-mode -mload-cache-mode;# -mbitfield-mode -mtest4 .ENHANCED;# begin scan referenced symbols;# end scan referenced symbols .CODE$_memcpy: enter #1?LBB_memcpy: st AH,@H'fff9 ld AH,@(H'0001,Y) ld X,@H'fff9?LBB2: st X,@H'fff8 st AL,@H'fffa add AH,#-H'0001 cmp AH,#-H'0001 beq ?L7?L5: ld X,@H'fffa ld AL,@(0,X) ld X,@H'fff8 st AL,@(0,X) ld AL,#H'0001 add AL,@H'fffa st AL,@H'fffa ld X,#H'0001 add X,@H'fff8 st X,@H'fff8 add AH,#-H'0001 cmp AH,#-H'0001 bne ?L5?L7:?LBE2: ld AH,@H'fff9?LBE_memcpy: leave #1;.stabn 192,0,0,?LBB2;.stabn 224,0,0,?LBE2 ENDMOD;# Function pattern *movqi2 used[0] = 6 used[1] = 4 total = 10;# Function pattern *movqi3 used[0] = 1 total = 1;# Function pattern *movqi8 used[0] = 1 total = 1;# Function pattern *addqi2 used[0] = 2 used[2] = 2 total = 4;# Function pattern movstrqi+5 used[0] = 2 total = 2 MODULE memset .LARGE ; really small mode but we need space for debug symbols; GNU C version 3.3.3 (BlueLab 3.6.2-release); compiled by GNU C version 3.2.3 (mingw special 20030504-1).;# options passed: ;# -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/include;# -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/lib/gcc-lib/xap-local-xap/3.3.3/install-tools/include;# -I. -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/include;# -iprefix -isystem -D__GNUC__=3 -D__GNUC_MINOR__=3;# -D__GNUC_PATCHLEVEL__=3 -MD -MQ -mno-leaf-optim -ansi -auxbase-strip -g;# -g -O -pedantic -Wall -Wmissing-prototypes -Wstrict-prototypes;# -Wsign-compare -Wredundant-decls -Werror -Wall -W -Wmissing-prototypes;# -Wstrict-prototypes -Wsign-compare -Wredundant-decls -Werror -ansi;# -fno-builtin-memcpy;# options enabled: -fdefer-pop -fthread-jumps -fpeephole -ffunction-cse;# -fkeep-static-consts -fpcc-struct-return -fgcse-lm -fgcse-sm;# -floop-optimize -fcrossjumping -fif-conversion -fif-conversion2;# -fsched-interblock -fsched-spec -fbranch-count-reg -fcprop-registers;# -fcommon -fgnu-linker -fargument-alias -fmerge-constants;# -fzero-initialized-in-bss -fleading-underscore -fident;# -fguess-branch-probability -fmath-errno -ftrapping-math -mpeephole;# -mquiet-mode -minline-block-copy-mode -menhanced-mode -mload-cache-mode;# -mbitfield-mode -mtest4 .ENHANCED;# begin scan referenced symbols;# import $_memcpy;# end scan referenced symbols .CODE$_memset: enter #3?LBB_memset: st AH,@(H'0001,Y) ld AH,@$XAP_AL ld AL,@(H'0003,Y)?LBB2: cmp AL,#H'0000 beq ?L2 ld X,@(H'0001,Y)?LBB3: st AH,@(0,X) ld AH,@$XAP_UXL add AH,#H'0001 add AL,#-H'0001 st AL,@(0,Y) ld AL,@$XAP_UXL bsr $_memcpy?L2:?LBE3:?LBE2: ld AH,@(H'0001,Y)?LBE_memset: leave #3 ENDMOD;# Function pattern *movqi2 used[0] = 6 used[1] = 1 total = 7;# Function pattern *movqi3 used[0] = 2 total = 2;# Function pattern *addqi2 used[0] = 2 total = 2;# Function pattern *call_value1 used[0] = 1 total = 1;# Function pattern movstrqi+3 used[0] = 1 total = 1 MODULE memcmp .LARGE ; really small mode but we need space for debug symbols; GNU C version 3.3.3 (BlueLab 3.6.2-release); compiled by GNU C version 3.2.3 (mingw special 20030504-1).;# options passed: ;# -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/include;# -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/lib/gcc-lib/xap-local-xap/3.3.3/install-tools/include;# -I. -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/include;# -iprefix -isystem -D__GNUC__=3 -D__GNUC_MINOR__=3;# -D__GNUC_PATCHLEVEL__=3 -MD -MQ -mno-leaf-optim -ansi -auxbase-strip -g;# -g -O -pedantic -Wall -Wmissing-prototypes -Wstrict-prototypes;# -Wsign-compare -Wredundant-decls -Werror -Wall -W -Wmissing-prototypes;# -Wstrict-prototypes -Wsign-compare -Wredundant-decls -Werror -ansi;# -fno-builtin-memcpy;# options enabled: -fdefer-pop -fthread-jumps -fpeephole -ffunction-cse;# -fkeep-static-consts -fpcc-struct-return -fgcse-lm -fgcse-sm;# -floop-optimize -fcrossjumping -fif-conversion -fif-conversion2;# -fsched-interblock -fsched-spec -fbranch-count-reg -fcprop-registers;# -fcommon -fgnu-linker -fargument-alias -fmerge-constants;# -fzero-initialized-in-bss -fleading-underscore -fident;# -fguess-branch-probability -fmath-errno -ftrapping-math -mpeephole;# -mquiet-mode -minline-block-copy-mode -menhanced-mode -mload-cache-mode;# -mbitfield-mode -mtest4 .ENHANCED;# begin scan referenced symbols;# end scan referenced symbols .CODE$_memcmp: enter #1?LBB_memcmp: ld X,@(H'0001,Y)?LBB2: st AL,@H'fff8 ld AL,#-H'0001 add AL,@$XAP_UXL st AL,@(-1,Y) cmp AL,#-H'0001 beq ?L11?L9: ld X,@$XAP_AH ld AL,@(0,X) ld X,@H'fff8 cmp AL,@(0,X) bcc ?L5 ld AH,#-H'0001 bra (?L1)?L5: ld X,@$XAP_AH ld AL,@(0,X) ld X,@H'fff8 cmp AL,@(0,X) bcz ?L7 ld AH,#H'0001 bra (?L1)?L7: add AH,#H'0001 ld AL,#H'0001 add AL,@H'fff8 st AL,@H'fff8 ld X,#-H'0001 add X,@(-1,Y) st X,@(-1,Y) cmp X,#-H'0001 bne ?L9?L11: ld AH,#H'0000?L1:?LBE2:?LBE_memcmp: leave #1;.stabn 192,0,0,?LBB2;.stabn 224,0,0,?LBE2 ENDMOD;# Function pattern *movqi2 used[0] = 6 used[1] = 2 total = 8;# Function pattern *movqi3 used[0] = 2 total = 2;# Function pattern *movqi8 used[0] = 4 total = 4;# Function pattern *addqi2 used[0] = 1 used[2] = 3 total = 4;# Function pattern jump used[0] = 2 total = 2;# Function pattern movstrqi+5 used[0] = 4 total = 4 MODULE _init .LARGE ; really small mode but we need space for debug symbols; GNU C version 3.3.3 (BlueLab 3.6.2-release); compiled by GNU C version 3.2.3 (mingw special 20030504-1).;# options passed: ;# -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/include;# -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/lib/gcc-lib/xap-local-xap/3.3.3/install-tools/include;# -I. -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/include;# -iprefix -isystem -D__GNUC__=3 -D__GNUC_MINOR__=3;# -D__GNUC_PATCHLEVEL__=3 -MD -MQ -mno-leaf-optim -ansi -auxbase-strip -g;# -g -O -pedantic -Wall -Wmissing-prototypes -Wstrict-prototypes;# -Wsign-compare -Wredundant-decls -Werror -Wall -W -Wmissing-prototypes;# -Wstrict-prototypes -Wsign-compare -Wredundant-decls -Werror -ansi;# -fno-builtin-memcpy;# options enabled: -fdefer-pop -fthread-jumps -fpeephole -ffunction-cse;# -fkeep-static-consts -fpcc-struct-return -fgcse-lm -fgcse-sm;# -floop-optimize -fcrossjumping -fif-conversion -fif-conversion2;# -fsched-interblock -fsched-spec -fbranch-count-reg -fcprop-registers;# -fcommon -fgnu-linker -fargument-alias -fmerge-constants;# -fzero-initialized-in-bss -fleading-underscore -fident;# -fguess-branch-probability -fmath-errno -ftrapping-math -mpeephole;# -mquiet-mode -minline-block-copy-mode -menhanced-mode -mload-cache-mode;# -mbitfield-mode -mtest4 .ENHANCED;# begin scan referenced symbols;# end scan referenced symbols .CODE$__init: enter #1?LBB__init:?LBE__init: leave #1 ENDMOD MODULE malloc .ENHANCED .CSEG CODE .LARGE$_malloc: DC ((256*3)+9) rtstrapset_1 EQU $trapset_1 ENDMOD malloc MODULE free .ENHANCED .CSEG CODE .LARGE$_free: DC ((256*4)+9) rtstrapset_1 EQU $trapset_1 ENDMOD free MODULE realloc .ENHANCED .CSEG CODE .LARGE$_realloc: DC ((256*5)+9) rtstrapset_1 EQU $trapset_1 ENDMOD realloc MODULE exit .ENHANCED .CSEG CODE .LARGE$_exit: DC ((256*7)+9) rtstrapset_1 EQU $trapset_1 ENDMOD exit MODULE udiv .LARGE ; really small mode but we need space for debug symbols; GNU C version 3.3.3 (BlueLab 3.6.2-release); compiled by GNU C version 3.2.3 (mingw special 20030504-1).;# options passed: ;# -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/include;# -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/lib/gcc-lib/xap-local-xap/3.3.3/install-tools/include;# -I. -Ic:/src/active/bluelab362/result/image/bluelab_full/tools/include;# -iprefix -isystem -D__GNUC__=3 -D__GNUC_MINOR__=3;# -D__GNUC_PATCHLEVEL__=3 -MD -MQ -mno-leaf-optim -ansi -auxbase-strip -g;# -g -O -pedantic -Wall -Wmissing-prototypes -Wstrict-prototypes;# -Wsign-compare -Wredundant-decls -Werror -Wall -W -Wmissing-prototypes;# -Wstrict-prototypes -Wsign-compare -Wredundant-decls -Werror -ansi;# -fno-builtin-memcpy;# options enabled: -fdefer-pop -fthread-jumps -fpeephole -ffunction-cse;# -fkeep-static-consts -fpcc-struct-return -fgcse-lm -fgcse-sm;# -floop-optimize -fcrossjumping -fif-conversion -fif-conversion2;# -fsched-interblock -fsched-spec -fbranch-count-reg -fcprop-registers;# -fcommon -fgnu-linker -fargument-alias -fmerge-constants;# -fzero-initialized-in-bss -fleading-underscore -fident;# -fguess-branch-probability -fmath-errno -ftrapping-math -mpeephole;# -mquiet-mode -minline-block-copy-mode -menhanced-mode -mload-cache-mode;# -mbitfield-mode -mtest4 .ENHANCED;# begin scan referenced symbols;# import $__udivmod;# end scan referenced symbols .CODE$___udivhi3: enter #6?LBB___udivhi3: st AH,@H'fff8 st AL,@H'fff9 ld AH,@(H'0006,Y) ld AL,@(H'0007,Y)?LBB2: st AH,@(0,Y) st AL,@(1,Y) ld AL,@$XAP_UY add AL,#H'0003 st AL,@(H'0002,Y) ld AH,@H'fff8 ld AL,@H'fff9 bsr $__udivmod?LBE2:?LBE___udivhi3: leave #6;.stabn 192,0,0,?LBB2;.stabn 224,0,0,?LBE2 ENDMOD;# Function pattern *movqi2 used[0] = 1 total = 1;# Function pattern *movhi used[2] = 2 used[3] = 2 total = 4;# Function pattern *addqi0 used[0] = 1 total = 1;# Function pattern *call_value1 used[0] = 1 total = 1 MODULE MessageSendLater .ENHANCED .CSEG CODE .LARGE$_MessageSendLater: DC ((256*9)+9) rtstrapset_1 EQU $trapset_1 ENDMOD MessageSendLater MODULE MessageCancelFirst .ENHANCED .CSEG CODE .LARGE$_MessageCancelFirst: DC ((256*10)+9) rtstrapset_1 EQU $trapset_1 ENDMOD MessageCancelFirst MODULE Panic .ENHANCED .CSEG CODE .LARGE$_Panic: DC ((256*14)+9) rtstrapset_1 EQU $trapset_1 ENDMOD Panic MODULE PanicNull .ENHANCED .CSEG CODE .LARGE$_PanicNull: DC ((256*15)+9) rtstrapset_1 EQU $trapset_1 ENDMOD PanicNull MODULE PsStore .ENHANCED .CSEG CODE .LARGE$_PsStore: DC ((256*17)+9) rtstrapset_1 EQU $trapset_1 ENDMOD PsStore MODULE PsRetrieve
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -