📄 outp1.asm
字号:
.global outP1 .section cpu_dir, #alloc .word 'o'+'u'+'t'+'P'+'1'+'.'+'c'+'g'+'i' .byte 0x10 ;cgi .byte 0 ;reserved .word cgibegin .word cgiend .section cpu_files, #alloccgibegin: ;outP1.cgi .pcode outP1 .pcode pretcgiend: .textoutP1: jnb flagSecure,noExecCgi mov state80,#'1' ; find '1' item - out P1 lcall scanpar jnb zflag, no1cmd ;; cmdDdump8: mov r1,#8dump0: mov a,@r0 mov r7,a cjne r7,#'&',L9 ;ret form item separatornoExecCgi:no1cmd: retL9: cjne r7,#' ',L8 ret ;ret if space delimiterL8: anl a,#0b11100000 jnz L7 ret ;ret if control charL7: inc r0;get Hex parametr mov a,@r0 inc r0 jnb acc.6,L10 ;convert ascii to hex nibble add a,#9L10: anl a,#0x0F swap a mov r6,a mov a,@r0 inc r0 jnb acc.6,L11 ;convert ascii to hex nibble add a,#9L11: anl a,#0x0F orl a,r6 cjne r7,#'A',LnoAND ;AND_port command anl P1,a sjmp LnextLnoAND: cjne r7,#'O',LnoOR ;OR_port command orl P1,a sjmp LnextLnoOR: cjne r7,#'X',LnoXOR ;XOR_port command xrl P1,a sjmp LnextLnoXOR: cjne r7,#'S',no1cmd ;SET_port command mov P1,aLnext: djnz r1,dump0; advance processed bytes forward and copy next fragment of parameters lcall scancont sjmp dump8 ;; END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -