sdrv_functions_thai.lst

来自「一种彩屏驱动以及画点,填充图片和填充数据的一些程序」· LST 代码 · 共 438 行 · 第 1/2 页

LST
438
字号
##############################################################################
#                                                                            #
# IAR Z80/64180 C-Compiler V4.04B/WIN                                        #
# Front End V4.20N                                       18/May/107  10:53:24 #
# Global Optimizer V1.05D                                                    #
#                                                                            #
#       Target option =  Z80                                                 #
#       Memory model  =  large                                               #
#       Source file   =  d:\case_i_d913f\drv\ui_ssd1332\sdrv_thai\sdrv_functions_thai.c#
#       List file     =  d:\case_i_d913f\drv\ui_ssd1332\ui_ssd13_th\list\sdrv_functions_thai.lst#
#       Object file   =  d:\case_i_d913f\drv\ui_ssd1332\ui_ssd13_th\obj\sdrv_functions_thai.r01#
#       ASM file      =  d:\case_i_d913f\drv\ui_ssd1332\ui_ssd13_th\list\sdrv_functions_thai.s01#
#       Command line  =  -v0 -ml -uu                                         #
#                        -OD:\case_i_d913f\drv\Ui_SSD1332\ui_ssd13_th\Obj\   #
#                        -e -K -w -gA -s9 -RCODE -r0 -DIC3951 -DNAPDEBUG     #
#                        -LD:\case_i_d913f\drv\Ui_SSD1332\ui_ssd13_th\List\  #
#                        -q -t8                                              #
#                        -AD:\case_i_d913f\drv\Ui_SSD1332\ui_ssd13_th\List\  #
#                        -Id:\sdk_i_913f\inc\ -Id:\case_i_d913f\inc\         #
#                        -Id:\case_i_d913f\drv\ui_ssd1332\inc\               #
#                        D:\CASE_I_D913F\DRV\UI_SSD1332\SDRV_THAI\sdrv_functions_thai.c #
#                                                                            #
#                                             (c) Copyright IAR Systems 1996 #
##############################################################################

   \   0000                    NAME    sdrv_functions_thai(16)
   \   0000                    RSEG    UI_RCODE(0)
   \   0000                    EXTERN  AsciiSelect
   \   0000                    PUBLIC  CheckCharMode
   \   0000                    PUBLIC  CheckDisplaySpace
   \   0000                    PUBLIC  CheckSymbol
   \   0000                    EXTERN  PutCharErrFlag
   \   0000                    EXTERN  putCharChFlag
   \   0000                    EXTERN  region
   \   0000                    EXTERN  region_win
   \   0000                    EXTERN  ?CLZ80L_4_04_L00
   \   0000                    RSEG    UI_RCODE
   \   0000            CheckCharMode:
      1          /*
      2          ********************************************************************************
      3          *                       ACTOS
      4          *                  ui dirver show picture
      5          *
      6          *                (c) Copyright 2002-2003, Actions Co,Ld.
      7          *                        All Right Reserved
      8          *
      9          * File   : Sdrv_functions.c
     10          * By     : Rcmai
     11          * Version: 1> v1.00     first version     10/17/2003 10:46PM
     12          ********************************************************************************
     13          */
     14          #include "display.h"
     15          #include "Drv_S6B33B0A.h"
     16          
     17          #pragma codeseg(UI_RCODE)
     18          
     19          
     20          ////*******************************************************************************/
     21          ///*
     22          //** FUNCTION:     CheckCharMode
     23          //**
     24          //** Description:  检测字符的模式
     25          //**
     26          //**  input
     27          //**     code: 字的内码
     28          //**
     29          //**  output
     30          //**     == CharMode1616: 汉字
     31          //**     == CharMode0816: 大ASCII
     32          //**     == CharMode0608: 小ASCII
     33          //********************************************************************************/
     34          non_banked char CheckCharMode(int code)
     35          {
   \   0000  D5                PUSH    DE
     36              //*如下动作主要是取 int code 的高8位来作比较(int 型参数是以 de 传送的,*
     37              //*    也就是要用d的值来作比较),用如下指令可使编译器优化成不用移位而  *
     38              //*    直接使用d的值来作比较。可省去不少时间及代码空间。               *
     39              //if ((unsigned char)((unsigned int)code>>8) >= FirstSectionCode)
     40          
     41              if ((unsigned char)code >= 0xa0)
   \   0001  7B                LD      A,E
   \   0002  FEA0              CP      160
   \   0004  3006              JR      NC,?0003
   \   0006            ?0000:
     42              {
     43                  return CharMode0816;//汉字
     44              }
   \   0006            ?0001:
     45              else if (AsciiSelect == FONT_TYPE_SMALL)
   \   0006  3A0000            LD      A,(AsciiSelect)
   \   0009  B7                OR      A
   \   000A  2802              JR      Z,?0004
   \   000C            ?0002:
     46              {
     47                  return CharMode0608;//小字体ASCII
     48              }
   \   000C            ?0003:
     49              return CharMode0816;//大字体ASCII
   \   000C  3E01              LD      A,1
     50          }
   \   000E            ?0004:
   \   000E  E1                POP     HL
   \   000F  C9                RET
   \   0010            CheckSymbol:
     51          //================================================================================
     52          
     53          non_banked char CheckSymbol(int code)
     54          {
   \   0010  DDE5              PUSH    IX
   \   0012  D5                PUSH    DE
   \   0013  DDE1              POP     IX
     55              if(((unsigned char)code == 0xd1)||(((unsigned char)code >= 0xd4)&&((unsigned char)code <= 0xda))||
     56                  (((unsigned char)code >= 0xe7)&&((unsigned char)code <= 0xee)))
   \   0015  7B                LD      A,E
   \   0016  FED1              CP      209
   \   0018  2817              JR      Z,?0012
   \   001A  DDE5              PUSH    IX
   \   001C  E1                POP     HL
   \   001D  7D                LD      A,L
   \   001E  FED4              CP      212
   \   0020  3805              JR      C,?0010
   \   0022  3EDA              LD      A,218
   \   0024  BD                CP      L
   \   0025  300A              JR      NC,?0012
   \   0027            ?0010:
   \   0027            ?0009:
   \   0027  7D                LD      A,L
   \   0028  FEE7              CP      231
   \   002A  3822              JR      C,?0006
   \   002C  3EEE              LD      A,238
   \   002E  BD                CP      L
   \   002F  381D              JR      C,?0006
   \   0031            ?0012:
   \   0031            ?0011:
   \   0031            ?0007:
   \   0031            ?0008:
   \   0031            ?0005:
     57              {
     58                  //charclarityBak = charclarity;
     59                  //charclarity = 0;
     60                  if(((unsigned char)code == 0xd8)||((unsigned char)code == 0xd9)||((unsigned char)code == 0xda))
   \   0031  DDE5              PUSH    IX
   \   0033  E1                POP     HL
   \   0034  7D                LD      A,L
   \   0035  FED8              CP      216
   \   0037  280A              JR      Z,?0015
   \   0039  7D                LD      A,L
   \   003A  FED9              CP      217
   \   003C  2805              JR      Z,?0015
   \   003E  7D                LD      A,L
   \   003F  FEDA              CP      218
   \   0041  2004              JR      NZ,?0014
   \   0043            ?0015:
   \   0043            ?0016:
   \   0043            ?0013:
     61                  {
     62                      putCharChFlag = 3;
   \   0043  3E03              LD      A,3
   \   0045  1802              JR      ?0039
     63                      return 3;
     64                  }
   \   0047            ?0014:
     65                  else
     66                  {
     67                      putCharChFlag = 5;
   \   0047  3E05              LD      A,5
   \   0049            ?0039:
   \   0049  320000            LD      (putCharChFlag),A
     68                      return 5;
     69                  }
   \   004C  1806              JR      ?0017
   \   004E            ?0006:
     70                  
     71              }
     72              else 
     73              {
     74                      //charclarity = charclarityBak;
     75                      putCharChFlag = 8;
   \   004E  3E08              LD      A,8
   \   0050  320000            LD      (putCharChFlag),A
     76                      return 0;    
   \   0053  AF                XOR     A
     77               }   
   \   0054            ?0017:
   \   0054  DDE1              POP     IX
   \   0056  C9                RET
     78          }
   \   0057            CheckDisplaySpace:
     79          
     80          ////*******************************************************************************/
     81          ///*
     82          //** FUNCTION:     non_banked bool CheckDisplaySpace
     83          //**
     84          //** Description:  检测屏幕空间是否满足显示要求,如超出范围则报错
     85          //**
     86          //**  input
     87          //**     codemod: 点阵的模式
     88          //**
     89          //**  output
     90          //**     True: 屏幕空间能满足显示要求
     91          //**     False: 屏幕空间不能满足显示要求
     92          //********************************************************************************/
     93          
     94          non_banked bool CheckDisplaySpace(char codemod)
     95          {    
   \   0057  C5                PUSH    BC
   \   0058  D5                PUSH    DE
     96              switch(codemod)
   \   0059  7B                LD      A,E
   \   005A  FE00              CP      0
   \   005C  2046              JR      NZ,?0024
   \   005E            ?0019:
     97              {    
     98              case CharMode0608://06*08点阵模式(ascii小字体)
     99                  // region.x [0 ~ Displaylength-1] 
    100                  // region.y [0 ~ Displayhight-1] 
    101                  if (region.x+ASCII_SMALL_WIDTH_DEF > region_win.x+region_win.width)
   \   005E  ED4B0000          LD      BC,(region)
   \   0062  0600              LD      B,0

⌨️ 快捷键说明

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