⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timer2.asm

📁 一个cpu的vhdl语言程序。非常好的 一个cpu的vhdl语言程序。非常好的
💻 ASM
字号:
ldi acc,#F0h stacc port ; port gets 0xFF ldi acc,#00h ; low byte is in mem loc 0 stm acc,#0h loop: call delay1_sec ldm acc,#0h ; get counter value oracci #F0h ; initially, both LE_L are high andacci #dfh ; set lsb LDE LE_L low stacc port ; write to port oracci #20h ; set it back high stacc port ; and write to port disp_high_byte: ldm acc,#0h ; get the data shracc shracc shracc shracc ; get the high nibble oracci #F0h ; initially, both LE_L are high andacci #efh ; set msb LE_H low stacc port ; write to port oracci #10h ; set LE_L back high (latch data into LED) stacc port ; and write to port ldm acc,#0h ; get counter from mem addacci #1h ; increment it and stm acc,#0h ; save to mem jmp loop delay1_sec: push acc ldi acc,#ffh yy: call delay1_ms subacci #01h cmpacci #00h jne yy pop acc ret delay1_ms: push acc ldi acc,#ffh xx: subacci #01h cmpacci #00h cmpacci #00h cmpacci #00h jne xx pop acc ret END 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -