dscdec.lst
来自「MP3 整个 SDK」· LST 代码 · 共 545 行 · 第 1/3 页
LST
545 行
################################################################################
# #
# IAR Systems Z80/64180 Assembler V3.03A/WIN 25/Dec/106 16:59:37 #
# #
# Target option = z80 #
# Source file = d:\case_i_d90f\ap\ap_dsc2x_dec\dscdec.msa #
# List file = d:\case_i_d90f\ap\ap_dsc2x_dec\list\dscdec.lst #
# Object file = d:\case_i_d90f\ap\ap_dsc2x_dec\obj\dscdec.r01 #
# Command line = -v0 -OD:\case_i_d90f\ap\Ap_DSC2X_DEC\Obj\ -s+ #
# -M<> -w+ -r -DNAPDEBUG -DAMV_JPG_TXT #
# -LD:\case_i_d90f\ap\Ap_DSC2X_DEC\List\ -t8 #
# -Id:\sdk_i_90f\inc\ -Id:\case_i_d90f\inc\ #
# D:\CASE_I_D90F\AP\AP_DSC2X_DEC\DSCDec.msa #
# #
# (c) Copyright IAR Systems 1996 #
################################################################################
1 000000 /*************************
2 000000 * File Name: DSCDec.msa
3 000000 * Author : JackLee
4 000000 * Version : 1.00
5 000000 * Date : 2004-7-23 9:24
6 000000 *
7 000000 *write time:2004-7-23 11:37
8 000000 *code segment: DSCDecPM
9 000000 *data segment: DSCDecDM
10 000000 *Debug List:
11 000000 *2004-9-24 9:08 debug the screen normal display
12 000000 *2005-1-27 11:14 fixed the fseek bug
13 000000 * change the dsp information address
for the Gif i
nterface
14 000000 ***********************/
15 000000 #define ProgressSmallSize
16 000000 #include "actos.h"
17 000000 #include "filesys.h"
18 000000 #define NoSdram
19 000000 #include "display.h"
20 000000
21 000000 #define GPIO_C_Data_Port 0f4h
22 000000 NAME DSCDecModule
23 000000 public PicViewInit
24 000000 public PicViewExit
25 000000 public DSCPicSetParament
26 000000 public PicViewOrder // dsp ISR order
27 000000 public JpegRegion
28 000000 public WindowModeH2V
29 000000 extern Dscdec_display
30 000000 // public DscDecoderMsg
31 000000 RSEG DSCDecPM
32 000000
33 000000 /**********************************
34 000000 *function name : void PicViewInit(handle fp,char *bu
f)
35 000000 * parament :
36 000000 * fp -> it is the jepg or bmp file
37 000000 * buf-> the is jepg data buf
38 000000 *
39 000000 *
40 000000
41 000000
42 000000 #define IRQ_ADC 7
43 000000 #define IRQ_KEY 6
44 000000 #define IRQ_DMACTC 4
45 000000 #define IRQ_MIX 3
46 000000 #define IRQ_USB 2
47 000000 #define IRQ_UARTIRSPDIF 1
48 000000 #define IRQ_DSP 0
49 000000
50 000000
51 000000
52 000000 ***********************************/
53 000000 PicViewInit:
54 000000 D5 push de // save t
he de reg
55 000001 C5 push bc // save t
he be reg
56 000002 DB05 IN A,(05H)
57 000004 E60F AND 0FH
58 000006 D305 OUT (05H),A
59 000008 ED53.... ld (LWRD PicFileHandle), de // get the
file handle
60 00000C // ld (LWRD PicBitStreamBufPtr), bc // get
the buf pointer
61 00000C
62 00000C 11.... LD DE, LWRD JpegDataBuf // bitsre
am buf
63 00000F 0E01 LD C,1
64 000011 2A.... LD HL,(LWRD PicFileHandle) // file h
andle
65 000014 E5 PUSH HL // send
the para
ment
66 000015 mFS_FRead // call
the fread function in file system
66.1 000015 218C12 ld hl,API_FS_FRead
66.2 000018 D7 rst RSTBankAPI
66.3 000019 endm
67 000019 E1 pop hl // callb
ack the
stack
68 00001A
69 00001A
70 00001A 11.... LD DE,LWRD PicViewDSPISR ; // The Se
nsor ISR Entry
71 00001D 0E00 LD C,0
72 00001F mIRQ_Intercept // Set th
e dsp isr
72.1 00001F 210000 ld hl,API_IRQ_Intercept
72.2 000022 D7 rst RSTBankAPI
72.3 000023 endm
73 000023 22.... ld (LWRD SystemOldIsr),HL // SAVE T
HE OLD ISR
74 000026
75 000026 21.... ld hl, LWRD JpegDataBuf
76 000029 7E ld a, (hl)
77 00002A FE47 cp 47h
78 00002C 2005 jr nz,FileIsNotGif
79 00002E 11.... LD DE,LWRD GifDecoderName; // Gif Da
ta
80 000031 1803 jr GetTheDspCode;
81 000033 FileIsNotGif:
82 000033 11.... LD DE,LWRD DSCDecoderName; // THE DS
P CODE NAME
83 000036 GetTheDspCode:
84 000036 0E00 LD C,0 // INT TY
pe
85 000038 mInitDSPCode // Init t
he dsp code
85.1 000038 212300 ld hl,API_InitDSPCode
85.2 00003B D7 rst RSTBankAPI
85.3 00003C endm
86 00003C AF xor a
87 00003D 32.... ld (LWRD PicViewOrder) ,a // clear
the message
88 000040 32.... ld (LWRD PicRowCnt),a
89 000043 C1 pop bc // return
the bc
90 000044 D1 pop de // return
the de
91 000045 C9 ret
92 000046
93 000046
94 000046 /**********************************
95 000046 *function name : void PicViewExit(void)
96 000046 * parament :
97 000046 *
98 000046 *
99 000046 *
100 000046 *
101 000046 ***********************************/
102 000046 PicViewExit:
103 000046 D5 push de // save th
e de reg
104 000047 C5 push bc // save th
e be reg
105 000048 ED5B.... LD DE,(LWRD SystemOldIsr); // retrun
the old isr
106 00004C 0E00 LD C,00h // ISR Typ
e
107 00004E mIRQ_Release // Set the
old ISr
107.1 00004E 210001 ld hl,API_IRQ_Release
107.2 000051 D7 rst RSTBankAPI
107.3 000052 endm
108 000052 C1 pop bc // return
the bc
109 000053 D1 pop de // return
the de
110 000054 C9 ret
111 000055
112 000055
113 000055
114 000055
115 000055
116 000055
117 000055
118 000055
119 000055
120 000055
121 000055
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?