📄 outcom.asm
字号:
.global outCom .equ TIMEOUT, 1 .section cpu_dir, #alloc .word 'o'+'u'+'t'+'C'+'o'+'m'+'.'+'c'+'g'+'i' .byte 0x10 ;cgi .byte 0 ;reserved .word cgibegin .word cgiend .section cpu_files, #alloccgibegin: ;outP1.cgi .pcode outCom .pcode pretcgiend: .textoutCom: jnb flagSecure,noExecCgi mov state80,#'C' ; find 'C' item - out Com lcall scanpar jnb zflag, noCcmd ;; cmdC ; copy first 8 char to Comdump8: mov r1,#8L0: mov a,@r0 mov r7,a cjne r7,#'&',L9 ;ret form item separator retL9: cjne r7,#' ',L8 ;ret if space delimiter retL8: anl a,#0b11100000 jnz L7 ret ;ret if control charL7: inc r0 cjne r7,#'+',L6 ;translated space char ? mov r7,#' ' ; back to space charL6: mov a,r7 cjne r7,#'%',L1 mov a,@r0 inc r0 jnb acc.6,L10 ;convert ascii to hex nibble add a,#9L10: anl a,#0x0F swap a mov r7,a mov a,@r0 inc r0 jnb acc.6,L11 ;convert ascii to hex nibble add a,#9L11: anl a,#0x0F orl a,r7L1:.if TIMEOUT lcall xputchar jz noCcmd ;timeout.else lcall putchar.endif djnz r1,L0; advance processed bytes forward and copy next fragment of parameters lcall scancont sjmp dump8noCcmd: noExecCgi: ret ;; END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -