📄 复件 ui_putchar_jp.msa
字号:
/*
********************************************************************************
* ACTOS
* driver demo
*
* (c) Copyright 2002-2003, Actions Co,Ld.
* All Right Reserved
*
* File : *.msa
* By : Chliang
* Version: 1> v1.00 first version date
********************************************************************************
*/
#include "display.h"
module UI_PutChar
public sUI_PutChar
extern CharPointBuffer
extern AsciiSelect
extern TextPage
extern TextColumn
extern sUIPutImageSub
extern sUI_GetFontPoint
rseg UI_RCODE
//*******************************************************************************/
/*
** FUNCTION: sUI_PutChar
**
** Description: output a char
**
** Arguments :
** input
** de=区位码
** output
** none
** bc=显示后的屏幕位置
********************************************************************************/
sUI_PutChar:
push bc
push de
ld bc,CharPointBuffer
call sUI_GetFontPoint //输入参数:bc=输出数据的存放地址,de=区位码
ld a,e //a=区码
cp 0x81 //change by ybfu
jr nc,Show16x16Picture
Show8x6Picture: //字符填写
ld a,(AsciiSelect)
cp 01h
jr c,lsUseAscii0608
jr z,lsUseAscii0608Inv
cp 04h
jr z,lsUseAscii0816
lsUseAscii0608:
call sGetCurrentPgAndCol //输出参数h=当前页 b=当前列
ld c,06h //宽
ld l,01h //高
ld de,CharPointBuffer
call sUIPutImageSub //输入参数:h=当前页,l=高度,b=当前列,c=列数,de=数据
jr ShowCharConti
lsUseAscii0608Inv:
jr ShowCharConti
lsUseAscii0816:
call sGetCurrentPgAndCol //输出参数h=当前页 b=当前列
ld c,08h //宽
ld l,02h //高
ld de,CharPointBuffer
call sUIPutImageSub //输入参数:h=当前页,l=高度,b=当前列,c=列数,de=要显示数据地址
jr ShowCharConti
Show16x16Picture: //汉字填写
call sGetCurrentPgAndCol //输出参数h=当前页 b=当前列
ld c,16 //宽
ld l,02h //高
ld de,CharPointBuffer
call sUIPutImageSub //输入参数:h=当前页,l=高度,b=当前列,c=列数,de=数据
ShowCharConti:
ld a,c //列数
add a,b //当前列
//ybfu
cp Displaylength+1 //是否过边界,最后一个字符为120+8=128,但实际上只放了120~127
jr c,_show_char_end //没越界退出,最大值128,可以跳走
ld a,Displaylength //ybfu
_show_char_end:
ld (TextColumn),a //保存新列位置
pop de
pop bc
ret
sGetCurrentPgAndCol: //输出参数h=当前页 b=当前列
ld a,(TextPage)
srl a //除以8
srl a
srl a
ld h,a
ld a,(TextColumn)
ld b,a
ret
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -