📄 hzmmi.s
字号:
mov R16,R10
xcall _write_data
.dbline 365
ldd R16,y+10
xcall _write_data
.dbline 366
ldi R16,36
xcall _write_order
.dbline 367
ldd R30,y+11
ldd R31,y+12
ldd R12,z+0
.dbline 368
mov R16,R12
xcall _write_data
.dbline 369
ldd R24,y+11
ldd R25,y+12
adiw R24,1
std y+11,R24
std y+12,R25
.dbline 370
ldi R16,192
xcall _write_order
.dbline 371
ldd R30,y+11
ldd R31,y+12
ldd R16,z+0
xcall _write_data
.dbline 372
ldd R24,y+11
ldd R25,y+12
adiw R24,1
std y+11,R24
std y+12,R25
.dbline 373
ldi R16,196
xcall _write_order
.dbline 374
ldd R24,y+8
ldd R25,y+9
adiw R24,32
std y+8,R24
std y+9,R25
.dbline 375
L90:
.dbline 360
inc R14
L92:
.dbline 360
mov R24,R14
cpi R24,16
brsh X6
xjmp L89
X6:
.dbline 376
; {
; q=address1/0x100; //地址高位
; w=address1%0x100; //地址低位
; write_data(w); //送低地址
; write_data(q); //送高地址
; write_order(0x24); //设置显示RAM地址
; dis_code=*pt;
; write_data(dis_code);
; pt++;
; write_order(0x0c0); //设置一次写数据指令代码
; write_data(*pt);
; pt++;
; write_order(0x0c4); //设置一次写数据指令代码
; address1=address1+DIS_LEN; //地址调整到下一行
; }
; }
xjmp L88
L87:
.dbline 378
; else
; { //如果本行只剩下半个字的位置,则将这个位置填空格
.dbline 379
; for(i=0;i<16;i++)
clr R14
xjmp L96
L93:
.dbline 380
.dbline 381
ldi R18,256
ldi R19,1
ldd R16,y+8
ldd R17,y+9
xcall div16s
std y+10,R16
.dbline 382
ldi R18,256
ldi R19,1
ldd R16,y+8
ldd R17,y+9
xcall mod16s
movw R10,R16
.dbline 384
mov R16,R10
xcall _write_data
.dbline 385
ldd R16,y+10
xcall _write_data
.dbline 386
ldi R16,36
xcall _write_order
.dbline 388
clr R16
xcall _write_data
.dbline 389
ldi R16,192
xcall _write_order
.dbline 390
clr R16
xcall _write_data
.dbline 391
ldi R16,192
xcall _write_order
.dbline 392
ldd R24,y+8
ldd R25,y+9
adiw R24,32
std y+8,R24
std y+9,R25
.dbline 393
L94:
.dbline 379
inc R14
L96:
.dbline 379
mov R24,R14
cpi R24,16
brlo L93
.dbline 394
; {
; q=address1/0x100; //地址高位
; w=address1%0x100; //地址低位
;
; write_data(w); //送低地址
; write_data(q); //送高地址
; write_order(0x24); //设置显示RAM地址
;
; write_data(00); //填空格
; write_order(0xc0); //设置一次写数据指令代码
; write_data(00); //填空格
; write_order(0xc0); //设置一次写数据指令代码
; address1=address1+DIS_LEN; //地址调整到下一行
; }
; *str--;
subi R20,1
sbci R21,0
.dbline 395
; *str--;
subi R20,1
sbci R21,0
.dbline 396
; }
L88:
.dbline 397
; lcol=lcol+16; //列数+8
subi R22,240 ; offset = 16
sbci R23,255
.dbline 398
; if(lcol>=160)
cpi R22,160
ldi R30,0
cpc R23,R30
brlt L97
.dbline 399
; {
.dbline 400
; lrow+=16;
ldd R24,y+6
ldd R25,y+7
adiw R24,16
std y+6,R24
std y+7,R25
.dbline 401
; lcol=0;
clr R22
clr R23
.dbline 402
; }
L97:
.dbline 403
L58:
.dbline 298
L60:
.dbline 298
movw R30,R20
ldd R2,z+0
tst R2
breq X7
xjmp L57
X7:
L59:
.dbline -2
.dbline 405
; }
;
; }
L56:
adiw R28,13
xcall pop_gset5
.dbline 0 ; func end
ret
.dbsym l lrow 6 I
.dbsym l aa 4 i
.dbsym l zk 0 L
.dbsym r lcol 22 I
.dbsym r dis_code 12 c
.dbsym l pt 11 pc
.dbsym r i 14 c
.dbsym r w 10 c
.dbsym l q 10 c
.dbsym l address1 8 I
.dbsym r str 20 pc
.dbsym r col 10 c
.dbsym r row 12 c
.dbfunc s str_sasc _str_sasc fI
; dis_code -> <dead>
; lrow -> y+4
; zk -> y+0
; aa -> R12,R13
; lcol -> R22,R23
; w -> R10
; pt -> R14,R15
; i -> y+9
; q -> y+8
; address1 -> y+6
; str -> R20,R21
; col -> R10
; row -> R12
.even
_str_sasc::
xcall push_gset5
mov R10,R18
mov R12,R16
sbiw R28,10
ldd R20,y+20
ldd R21,y+21
.dbline -1
.dbline 412
;
; //显示小ASCII串
; //row--行
; //col--列
; //str--字符串指针
; void str_sasc(byte row,byte col,byte *str)
; {
.dbline 419
; byte q,w,dis_code,i;
; int address1,lrow,lcol;
; byte *pt;
; unsigned int aa;
; long zk;
;
; lrow=row%80; //设置行
ldi R18,80
ldi R19,0
mov R16,R12
clr R17
xcall mod16s
std y+4,R16
std y+5,R17
.dbline 420
; lcol=(col*8)%160; //列
ldi R18,160
ldi R19,0
mov R16,R10
clr R17
lsl R16
rol R17
lsl R16
rol R17
lsl R16
rol R17
xcall mod16s
movw R22,R16
.dbline 422
;
; for(;*str;)
xjmp L103
L100:
.dbline 423
; {
.dbline 424
; q=(*str++);
movw R2,R20
movw R24,R2
adiw R24,1
movw R20,R24
movw R30,R2
ldd R2,z+0
std y+8,R2
.dbline 426
;
; if(q==13) //处理回车符
ldd R24,y+8
cpi R24,13
brne L104
.dbline 427
; {
.dbline 428
; lrow+=2; //换两行
ldd R24,y+4
ldd R25,y+5
adiw R24,2
std y+4,R24
std y+5,R25
.dbline 429
; lcol=0; //列的开始
clr R22
clr R23
.dbline 430
; continue;
xjmp L101
L104:
.dbline 432
; }
; if(q<0x20) continue; //为不可见字符,继续循环
ldd R24,y+8
cpi R24,32
brsh L106
.dbline 432
xjmp L101
L106:
.dbline 433
; zk=q*8l+0x100l;
ldi R24,3
ldi R25,0
ldd R2,y+8
clr R3
clr R4
clr R5
st -y,R24
movw R16,R2
movw R18,R4
xcall lsl32
movw R2,R16
movw R4,R18
ldi R16,<L67
ldi R17,>L67
xcall lpm32
add R2,R16
adc R3,R17
adc R4,R18
adc R5,R19
movw R30,R28
std z+0,R2
std z+1,R3
std z+2,R4
std z+3,R5
.dbline 434
; lib_addr.l=zk<<2;
ldi R24,2
ldi R25,0
st -y,R24
movw R16,R2
movw R18,R4
xcall lsl32
sts _lib_addr+1,R17
sts _lib_addr,R16
sts _lib_addr+2+1,R19
sts _lib_addr+2,R18
.dbline 435
; aa=lib_addr.bytes.a2 & 0x0f;
lds R24,_lib_addr+2
clr R25
andi R24,15
andi R25,0
movw R12,R24
.dbline 436
; PORTF=aa;
sts 98,R12
.dbline 437
; aa=(zk & 0x3fff) | 0xc000;
ldi R16,<L85
ldi R17,>L85
xcall lpm16
movw R30,R28
ldd R12,z+0
ldd R13,z+1
and R12,R16
and R13,R17
ldi R16,<L86
ldi R17,>L86
xcall lpm16
or R12,R16
or R13,R17
.dbline 438
; pt=(byte *)aa;
movw R14,R12
.dbline 439
; address1=lrow;
ldd R2,y+4
ldd R3,y+5
std y+6,R2
std y+7,R3
.dbline 440
; address1=DIS_LEN*address1+lcol/8;
ldi R18,8
ldi R19,0
movw R16,R22
xcall div16s
movw R2,R16
ldi R18,5
ldi R19,0
ldd R16,y+6
ldd R17,y+7
xcall lsl16
movw R4,R16
add R4,R2
adc R5,R3
std y+6,R4
std y+7,R5
.dbline 441
; address1=address1+START_ADDRESS; //+图形地址偏移量
.dbline 442
clr R0
std y+9,R0
xjmp L112
L109:
.dbline 442
.dbline 443
ldi R18,256
ldi R19,1
ldd R16,y+6
ldd R17,y+7
xcall div16s
std y+8,R16
.dbline 444
ldi R18,256
ldi R19,1
ldd R16,y+6
ldd R17,y+7
xcall mod16s
movw R10,R16
.dbline 446
mov R16,R10
xcall _write_data
.dbline 447
ldd R16,y+8
xcall _write_data
.dbline 448
ldi R16,36
xcall _write_order
.dbline 449
movw R30,R14
ldd R16,z+0
xcall _write_data
.dbline 450
movw R24,R14
adiw R24,1
movw R14,R24
.dbline 451
ldi R16,192
xcall _write_order
.dbline 452
ldd R24,y+6
ldd R25,y+7
adiw R24,32
std y+6,R24
std y+7,R25
.dbline 453
L110:
.dbline 442
ldd R0,y+9
inc R0
std y+9,R0
L112:
.dbline 442
; for(i=0;i<8;i++){
ldd R24,y+9
cpi R24,8
brlo L109
.dbline 454
; q=address1/0x100; //地址高位
; w=address1%0x100; //地址低位
;
; write_data(w); //送低地址
; write_data(q); //送高地址
; write_order(0x24); //设置显示RAM地址
; write_data(*pt);
; pt++;
; write_order(0x0c0); //设置一次写数据指令代码
; address1=address1+DIS_LEN; //地址调整到下一行
; }
; lcol=lcol+8;
subi R22,248 ; offset = 8
sbci R23,255
.dbline 455
; if(lcol>=160)
cpi R22,160
ldi R30,0
cpc R23,R30
brlt L113
.dbline 456
; {
.dbline 457
; lrow+=16;
ldd R24,y+4
ldd R25,y+5
adiw R24,16
std y+4,R24
std y+5,R25
.dbline 458
; lcol=0;
clr R22
clr R23
.dbline 459
; }
L113:
.dbline 460
L101:
.dbline 422
L103:
.dbline 422
movw R30,R20
ldd R2,z+0
tst R2
breq X8
xjmp L100
X8:
.dbline -2
.dbline 461
; }
; }
L99:
adiw R28,10
xcall pop_gset5
.dbline 0 ; func end
ret
.dbsym l dis_code 1 c
.dbsym l lrow 4 I
.dbsym l zk 0 L
.dbsym r aa 12 i
.dbsym r lcol 22 I
.dbsym r w 10 c
.dbsym r pt 14 pc
.dbsym l i 9 c
.dbsym l q 8 c
.dbsym l address1 6 I
.dbsym r str 20 pc
.dbsym r col 10 c
.dbsym r row 12 c
.dbfunc s mediacy_hz _mediacy_hz fI
; i -> R22
; str -> R10,R11
; row -> R20
.even
_mediacy_hz::
xcall push_gset3
movw R10,R18
mov R20,R16
sbiw R28,2
.dbline -1
.dbline 466
;
;
; //居中显示汉字串
; void mediacy_hz(byte row,byte* str)
; {
.dbline 468
; byte i;
; i=strlen(str);
movw R16,R10
xcall _strlen
movw R2,R16
mov R22,R2
.dbline 469
; if(i>=20)
cpi R22,20
brlo L116
.dbline 470
; str_hz(row,0,str);
std y+0,R10
std y+1,R11
clr R18
mov R16,R20
xcall _str_hz
xjmp L117
L116:
.dbline 472
std y+0,R10
std y+1,R11
ldi R17,2
mov R16,R22
xcall div8s
ldi R18,10
sub R18,R16
mov R16,R20
xcall _str_hz
L117:
.dbline -2
.dbline 473
; else
; str_hz(row,10-i/2,str);
; }
L115:
adiw R28,2
xcall pop_gset3
.dbline 0 ; func end
ret
.dbsym r i 22 c
.dbsym r str 10 pc
.dbsym r row 20 c
.dbfunc s dexter_hz _dexter_hz fI
; i -> R22
; str -> R10,R11
; row -> R20
.even
_dexter_hz::
xcall push_gset3
movw R10,R18
mov R20,R16
sbiw R28,2
.dbline -1
.dbline 477
;
; //居右显示汉字串
; void dexter_hz(byte row,byte* str)
; {
.dbline 479
; byte i;
; i=strlen(str);
movw R16,R10
xcall _strlen
movw R2,R16
mov R22,R2
.dbline 480
; if(i>=20)
cpi R22,20
brlo L119
.dbline 481
; str_hz(row,0,str);
std y+0,R10
std y+1,R11
clr R18
mov R16,R20
xcall _str_hz
xjmp L120
L119:
.dbline 483
std y+0,R10
std y+1,R11
ldi R18,20
sub R18,R22
mov R16,R20
xcall _str_hz
L120:
.dbline -2
.dbline 484
; else
; str_hz(row,20-i,str);
; }
L118:
adiw R28,2
xcall pop_gset3
.dbline 0 ; func end
ret
.dbsym r i 22 c
.dbsym r str 10 pc
.dbsym r row 20 c
.area bss(ram, con, rel)
.dbfile D:\美来尼尔\美兰尼尔改进\测控单元\面板程序\测控面板调试程序\hzmmi.c
_flag::
.blkb 1
.dbsym s flag _flag c
_sec_num::
.blkb 2
.dbsym s sec_num _sec_num s
_disp_buffer::
.blkb 128
.dbsym s disp_buffer _disp_buffer A[128:128]c
_lib_addr::
.blkb 4
.dbsym s lib_addr _lib_addr X
_ctl_data::
.blkb 1
.dbsym s ctl_data _ctl_data c
_mstimer3::
.blkb 2
.dbsym s mstimer3 _mstimer3 s
_mstimer1::
.blkb 2
.dbsym s mstimer1 _mstimer1 s
.area lit(rom, con, rel)
L86:
.word 49152,0
L85:
.word 16383,0
L83:
.word 4096,0
L82:
.word 94,0
L68:
.word 2048,0
L67:
.word 256,0
.area data(ram, con, rel)
.dbfile D:\美来尼尔\美兰尼尔改进\测控单元\面板程序\测控面板调试程序\hzmmi.c
L23:
.blkb 21
.area idata
.byte 48,49,50,51,52,53,54,55,56,57,48,49,50,51,52,53
.byte 54,55,56,57,0
.area data(ram, con, rel)
.dbfile D:\美来尼尔\美兰尼尔改进\测控单元\面板程序\测控面板调试程序\hzmmi.c
L22:
.blkb 21
.area idata
.byte 176,208,176,209,176,210,176,224,176,225,176,236,176,237,176,243
.byte 176,244,176,245,0
.area data(ram, con, rel)
.dbfile D:\美来尼尔\美兰尼尔改进\测控单元\面板程序\测控面板调试程序\hzmmi.c
L21:
.blkb 21
.area idata
.byte 176,161,176,161,176,161,176,162,176,162,176,162,176,163,49,50
.byte 51,52,53,54,0
.area data(ram, con, rel)
.dbfile D:\美来尼尔\美兰尼尔改进\测控单元\面板程序\测控面板调试程序\hzmmi.c
L20:
.blkb 25
.area idata
.byte 176,208,176,208,176,208,176,208,176,208,176,208,176,208,176,208
.byte 176,208,176,208,176,208,176,208,0
.area data(ram, con, rel)
.dbfile D:\美来尼尔\美兰尼尔改进\测控单元\面板程序\测控面板调试程序\hzmmi.c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -