參考資訊:
https://www.cypress.com/file/126446/download
Output Enable
I/O
main.s
oeb set 0xb3 oed set 0xb5 .org 0h jmp _start .org 0x100 _start: mov oeb, #0x04 mov oed, #0x00 loop: setb p1.2 call delay clr p1.2 call delay jmp loop delay: mov r6, #10 d0: mov r5, #255 d1: mov r4, #255 d2: djnz r4, d2 djnz r5, d1 djnz r6, d0 ret .end
編譯、燒錄
$ mcu8051ide --compile main.s Compiling file: main.s Initializing pre-processor ... Compiling ... Creating IHEX8 ... -> "main.hex" Creating object file ... -> "main.bin" Creating simulator data file ... -> "main.adf" Creating code listing file ... -> "main.lst" 0 errors, 0 warnings Compilation successful. (time: 0 sec.) $ sudo cycfx2prog prg:main.hex run Using ID 04b4:8613 on 002.019. Putting 8051 into reset. Programming 8051 using "main.hex". Putting 8051 out of reset.
完成