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

📄 74164.s

📁 使用mega8和iccavr编译器的一段ucos操作系统程序
💻 S
字号:
	.module _74164.c
	.area text(rom, con, rel)
	.dbfile G:\IccPro\ucos_m8_icc\source\74164.c
	.dbfunc e init164 _init164 fV
	.even
_init164::
	.dbline -1
	.dbline 6
; 
; #ifndef  OS_MASTER_FILE
; #include "includes.h"
; #endif
; 
; void  init164(void){
	.dbline 7
;     DDRB |= 0x01;
	sbi 0x17,0
	.dbline 8
;     DDRD |= 0xC0;
	in R24,0x11
	ori R24,192
	out 0x11,R24
	.dbline -2
L2:
	.dbline 0 ; func end
	ret
	.dbend
	.dbfunc e write164 _write164 fV
;             ch -> R10
;              i -> R12
;              x -> R16
	.even
_write164::
	rcall push_gset4x
	.dbline -1
	.dbline 11
; }
; 
; void  write164(unsigned char  x){
	.dbline 14
;     unsigned char  i,ch;
; 
;     ch = x;
	mov R10,R16
	.dbline 15
;     PORTB &= ~0x01;      //  消隐
	cbi 0x18,0
	.dbline 16
;     PORTD &= ~0x40;      //  CLK
	cbi 0x12,6
	.dbline 17
	clr R12
	rjmp L7
L4:
	.dbline 17
;     for(i=0; i<8; i++){
	.dbline 18
;         if(ch & 0x80)
	sbrs R10,7
	rjmp L8
	.dbline 19
;             PORTD |= 0x80;
	sbi 0x12,7
	rjmp L9
L8:
	.dbline 21
;         else
;             PORTD &= ~0x80;
	cbi 0x12,7
L9:
	.dbline 22
	lsl R10
	.dbline 23
	sbi 0x12,6
	.dbline 24
	nop
	.dbline 25
	cbi 0x12,6
	.dbline 26
L5:
	.dbline 17
	inc R12
L7:
	.dbline 17
	mov R24,R12
	cpi R24,8
	brlo L4
	.dbline 27
;         ch <<= 1;
;         PORTD |= 0x40;
;         asm("nop");
;         PORTD &= ~0x40;
;     }
;     PORTB |= 0x01;      //  显示
	sbi 0x18,0
	.dbline -2
L3:
	rcall pop_gset4x
	.dbline 0 ; func end
	ret
	.dbsym r ch 10 c
	.dbsym r i 12 c
	.dbsym r x 16 c
	.dbend

⌨️ 快捷键说明

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