📄 sdrv_getfontpoint.lst
字号:
################################################################################
# #
# IAR Systems Z80/64180 Assembler V3.03A/WIN 28/Dec/106 14:32:09 #
# #
# Target option = z80 #
# Source file = d:\case_i_d90f\drv\ui_ssd1332\sdrv\sdrv_getfontpoint.msa#
# List file = d:\case_i_d90f\drv\ui_ssd1332\ui_ssd13\list\sdrv_getfontpoint.lst#
# Object file = d:\case_i_d90f\drv\ui_ssd1332\ui_ssd13\obj\sdrv_getfontpoint.r01#
# Command line = -v0 -uu #
# -OD:\case_i_d90f\drv\Ui_SSD1332\UI_SSD13\Obj\ #
# -s+ -M<> -w+ -r -DIC3951 -DNAPDEBUG #
# -LD:\case_i_d90f\drv\Ui_SSD1332\UI_SSD13\List\ #
# -t8 -Id:\sdk_i_90f\inc\ -Id:\case_i_d90f\inc\ #
# -Id:\case_i_d90f\drv\Ui_SSD1332\inc\ #
# D:\CASE_I_D90F\DRV\UI_SSD1332\SDRV\Sdrv_GetFontPoint.msa #
# #
# (c) Copyright IAR Systems 1996 #
################################################################################
1 000000 /*
2 000000 ****************************************************
****************************
3 000000 * ACTOS
4 000000 * ui dirver show picture
5 000000 *
6 000000 * (c) Copyright 2002-2003, Actions Co
,Ld.
7 000000 * All Right Reserved
8 000000 *
9 000000 * File : UI_GetFontPoint.msa
10 000000 * By : Rcmai
11 000000 * Version: 1> v1.00 first version 12/03/2003
10:46PM
12 000000 ****************************************************
****************************
13 000000 */
14 000000 #include "display.h"
15 000000 #include "Drv_S6B33B0A.h"
16 000000
17 000000 module Sdrv_GetFontPoint
18 000000 // public sUI_GetFontPoint
19 000000 public Sdrv_GetFontPoint
20 000000 extern AsciiSelect
21 000000 extern AsciiFontLibAddr
22 000000 extern FontLibAddr
23 000000 extern CharPointBuffer
24 000000 extern SD_RWStruct
25 000000
26 000000 rseg UI_RCODE
27 000000
28 000000
29 000000 //**************************************************
******/
30 000000 /*
31 000000 ** FUNCTION: GetCharPoint
32 000000 **
33 000000 ** PURPOSE: Get Char Point Info by dma2
34 000000 **
35 000000 ** PARAMETERS:
36 000000 ** input
37 000000 ** de=区位码
38 000000 ** bc=输出数据的存放地址
39 000000 ** output
40 000000 ** none
41 000000 ** DESCRIPTION:
42 000000 //**************************************************
******/
43 000000
44 000000 Sdrv_GetFontPoint:
45 000000 C5 push bc
46 000001 D5 push de
47 000002 ED43.... ld (SD_RWStruct+5),bc
48 000006 3E08 ld a,0x08
49 000008 CB70 bit 6,b //bc是否大于4000
h
50 00000A 2804 jr z,_buffer_in_zram
51 00000C // dec a //0x07 fram b
uffer
52 00000C DB05 in a,(05h)
53 00000E E60F and 0fh
54 000010 _buffer_in_zram:
55 000010 32.... ld (SD_RWStruct+7),a
56 000013 GetChineseCharPoint:
57 000013 7B ld a,e //区码
58 000014 FEA1 cp FirstSectionCode
59 000016 3021 jr nc,_not_ascii
60 000018 _is_ascii:
61 000018 3A.... ld a,(AsciiSelect)
62 00001B FE04 cp FONT_TYPE_LARGE
63 00001D 3802 jr c,lsUse0608Type
64 00001F 180A jr lsUse0816Type
65 000021 lsUse0608Type:
66 000021 AF xor a
67 000022 67 ld h,a
68 000023 6B ld l,e
69 000024 0603 ld b,03h // ahl=a*8
70 000026 CD.... call AHL_LeftShift //输入参数:b
,hl
71 000029 1838 jr MoveAsciiPointToBuffer
72 00002B lsUse0816Type:
73 00002B AF xor a
74 00002C 67 ld h,a
75 00002D 6B ld l,e
76 00002E 0604 ld b,04h // ahl=a*16
77 000030 CD.... call AHL_LeftShift //输入参数:b
,hl
78 000033 010008 ld bc,800h //0816Type A
SCII起始地址=800h
79 000036 09 add hl,bc
80 000037 182A jr MoveAsciiPointToBuffer
81 000039 _not_ascii:
82 000039 FEB0 cp 0xb0 //简体字库起
始区码
83 00003B 3011 jr nc,_is_chinese
84 00003D _is_quanjiao:
85 00003D D6A1 sub FirstSectionCode
86 00003F CD.... call AddCountQuma //算出字个数
HL==((c-0xa1
)*94+(b-0xa1
))
87 000042 CD.... call AddCountWeima
88 000045 AF xor a
89 000046 0605 ld b,05h // ahl=a*32
90 000048 CD.... call AHL_LeftShift //输入参数:b
,hl
91 00004B C3.... jp MoveFontPointToBuffer
92 00004E _is_chinese:
93 00004E D6B0 sub 0xb0 //第一个汉字
的区码
94 000050 CD.... call AddCountQuma //算出字个数
HL==((c-0xb0
)*94+(b-0xa1
))
95 000053 CD.... call AddCountWeima
96 000056 014E03 ld bc,34eh //全角符号个
数=34eh
97 000059 09 add hl,bc
98 00005A AF xor a
99 00005B 0605 ld b,05h // ahl=a*32
100 00005D CD.... call AHL_LeftShift //输入参数:b
,hl
101 000060 C3.... jp MoveFontPointToBuffer
102 000063 //--------------------------------------------------
103 000063 MoveAsciiPointToBuffer:
104 000063 ED5B.... ld de,(AsciiFontLibAddr)
105 000067 19 add hl,de
106 000068 22.... ld (SD_RWStruct),hl
107 00006B 6F ld l,a
108 00006C 2600 ld h,0
109 00006E ED5B.... ld de,(AsciiFontLibAddr+2)
110 000072 ED5A adc hl,de
111 000074 22.... ld (SD_RWStruct+2),hl
112 000077 1814 jr MovePointToBuffer
113 000079 MoveFontPointToBuffer:
114 000079 ED5B.... ld de,(FontLibAddr)
115 00007D 19 add hl,de
116 00007E 22.... ld (SD_RWStruct),hl
117 000081 6F ld l,a
118 000082 2600 ld h,0
119 000084 ED5B.... ld de,(FontLibAddr+2)
120 000088 ED5A adc hl,de
121 00008A 22.... ld (SD_RWStruct+2),hl
122 00008D MovePointToBuffer:
123 00008D 11.... ld de,SD_RWStruct
124 000090 012000 ld bc,32
125 000093 mSD_Read
125.1 000093 3E00 ld a,API_SD_Read
125.2 000095 CF rst RSTFastAPI
125.3 000096 endm
126 000096 MovePointBufferEnd:
127 000096 D1 pop de
128 000097 C1 pop bc
129 000098 C9 ret
130 000099 //--------------------------------------------------
-
131 000099 AddCountASCII: //算ICON地址,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -