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

📄 ui_getkareanpoint.msa

📁 ATJ2091N 54版源程序
💻 MSA
字号:
/**********************************************************************************                       ACTOS*                  ui dirver show picture**                (c) Copyright 2002-2003, Actions Co,Ld.*                        All Right Reserved** File   : UI_GetFontPoint.msa* By     : Chliang* Version: 1> v1.00     first version     12/03/2003 10:46PM*********************************************************************************///#include "UI_S0724.h"#include "display.h"        module  UI_GetFontPoint        public  sUI_GetFontPoint        extern  AsciiSelect        extern  AsciiFontLibAddr        extern  FontLibAddr        extern  CharPointBuffer        extern  SD_RWStruct        rseg    UI_RCODE//********************************************************//*** FUNCTION:    GetCharPoint**** PURPOSE:     Get Char Point Info by dma2**** PARAMETERS:**  input**      de=区位码**      bc=输出数据的存放地址**  output**      none** DESCRIPTION://********************************************************/sUI_GetFontPoint:        push    bc        push    de        ld      (SD_RWStruct+5),bc        ld      a,0x08        bit     6,b                 //bc是否大于4000h        jr      z,_buffer_in_zram        in      a,(05h)        and     0fh_buffer_in_zram:        ld      (SD_RWStruct+7),aGetChineseCharPoint:        ld      a,e                 //区码        cp      0xa1    //Karoan        jr      nc,_not_ascii_is_ascii:        ld      a,(AsciiSelect)        cp      04h        jr      c,lsUse0608Type        jr      lsUse0816TypelsUse0608Type:        xor     a        ld      h,a        ld      l,e        ld      b,03h                   // ahl=e*8        call    AHL_LeftShift           //输入参数:b,hl        jr      MoveAsciiPointToBufferlsUse0816Type:        xor     a        ld      h,a        ld      l,e        ld      b,04h                   // ahl=e*16        call    AHL_LeftShift           //输入参数:b,hl        ld      bc,800h                 //0816Type ASCII起始地址=800h        add     hl,bc        jr      MoveAsciiPointToBuffer_not_ascii:        cp      0xb0                    //韩文字库起始区码        jr      nc,_is_chinese_is_quanjiao:        sub     FirstSectionCode        call    AddCountQuma            //算出字个数HL==((c-0xa1h)*94+(b-0a1h))*32        call    AddCountWeima        xor     a        ld      b,05h                   // ahl=a*32        call    AHL_LeftShift           //输入参数:b,hl        jp      MoveFontPointToBuffer_is_chinese:        sub     0xB0                    //第一个汉字的区码        call    AddCountQuma            //算出字个数HL==((c-0xb0h)*94+(b-0a1h))*32        call    AddCountWeima        ld      bc,468h                 //全角符号个数=468h        add     hl,bc        xor     a        ld      b,05h                   // ahl=a*32        call    AHL_LeftShift           //输入参数:b,hl        jp      MoveFontPointToBuffer//--------------------------------------------------MoveAsciiPointToBuffer:        ld      de,(AsciiFontLibAddr)        add     hl,de        ld      (SD_RWStruct),hl        ld      l,a        ld      h,0        ld      de,(AsciiFontLibAddr+2)        adc     hl,de        ld      (SD_RWStruct+2),hl        jr      MovePointToBufferMoveFontPointToBuffer:        ld      de,(FontLibAddr)        add     hl,de        ld      (SD_RWStruct),hl        ld      l,a        ld      h,0        ld      de,(FontLibAddr+2)        adc     hl,de        ld      (SD_RWStruct+2),hlMovePointToBuffer:        ld      de,SD_RWStruct        ld      bc,32        mSD_ReadMovePointBufferEnd:        pop     de        pop     bc        ret//---------------------------------------------------AddCountASCII:                       //算ICON地址,输入:hl   输出:hla        ret//---------------------------------------------------AddCountQuma:        push    bc        push    de        ld      l,a        ld      h,0        add     hl,hl               //hl*2(48-1)==hl*2(16*3-1)        ld      e,l        ld      d,h        call    HLShfit_4bit        ld      b,h                 //hl*3        ld      c,l        add     hl,hl        add     hl,bc        or      a        sbc     hl,de               //hl        pop     de        pop     bc        retAddCountWeima:        push    bc        ld      a,d        sub     0xa1        ld      c,a        ld      b,0        add     hl,bc        pop     bc        retAHL_LeftShift:              //输入参数:b,hl        sla     l        rl      h        rla        djnz    AHL_LeftShift        retHLShfit_5bit:        add     hl,hl       //HL*32HLShfit_4bit:        add     hl,hl       //HL*16HLShfit_3bit:                   //HL*8        add     hl,hlHLShfit_2bit:        add     hl,hlHLShfit_1bit:        add     hl,hl        ret/**********************************************************************************  the end of file*********************************************************************************/        end

⌨️ 快捷键说明

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