📄 outp13.asm
字号:
.global outP13 .section cpu_dir, #alloc .word 'o'+'u'+'t'+'P'+'1'+'3'+'.'+'c'+'g'+'i' .byte 0x10 ;cgi .byte 0 ;reserved .word cgibegin .word cgiend .section cpu_files, #alloccgibegin: ;outP1.cgi .pcode outP13 .pcode pretcgiend: .textoutP13: jnb flagSecure,noExecCgi mov state80,#'2' ; find '2' item - out P13 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',LnoAND1 ;AND_port1 command anl P1,a sjmp LnextLnoAND1: cjne r7,#'O',LnoOR1 ;OR_port1 command orl P1,a sjmp LnextLnoOR1: cjne r7,#'X',LnoXOR1 ;XOR_port1 command xrl P1,a sjmp LnextLnoXOR1: cjne r7,#'S',LnoS1 ;SET_port1 command mov P1,a sjmp LnextLnoS1: cjne r7,#'a',LnoAND3 ;AND_port3 command orl a,#0b11000000 ;don't change WR and RD pin anl P3,a sjmp LnextLnoAND3: cjne r7,#'o',LnoOR3 ;OR_port3 command orl P3,a sjmp LnextLnoOR3: cjne r7,#'x',LnoXOR3 ;XOR_port3 command anl a,#0b00111111 ;don't change WR and RD pin xrl P3,a sjmp LnextLnoXOR3: cjne r7,#'s',no1cmd ;SET_port3 command orl a,#0b11000000 ;don't change WR and RD pin mov P3,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 + -