source: branches/AS8051toC/Test/Test2.a51

Last change on this file was 25, checked in by chronos, 12 years ago
  • Upraveno: Rozšířeno převádění kódu na další případy.
File size: 3.3 KB
Line 
1;*******************************************************************************
2; Toto je komentář
3
4$ INCLUDE(SOUBOR.I51)
5
6PUBLIC _PRINT_INT ; Veřejná proměnná
7
8EXTRN CODE(ParGetParm,ParGetParmRaw) ; Import externí proměnné
9
10%DEFINE(DATE) (12/06/12) ; DD/MM/YY
11_DATE EQU %DATE ; Test equ
12
13 CSEG AT RESET ; Volba segmentu
14 JMP MainStart ; Instrukce skoku
15
16; Podminka preprocesoru
17 %IF(%NO_COMPILE EQ 0)
18 THEN
19 (
20 JMP Timer2Us
21 )ELSE
22 (
23 RETI
24 ) FI
25
26ADRVERZE: DB 13,10
27 DB 'VRVS',0
28 DB '0'+%MODEL/10,'0'+%MODEL-(%MODEL/10)*10,'.'
29
30MAINBIT SEGMENT BIT
31 RSEG MAINBIT
32
33WATCHDOG: DBIT 1 ; STAV WATCHDOGU
34
35 KEYS_LEN EQU $-KEYS
36
37%SET(CHARBEG,0)
38%*DEFINE(CHARDEFA(NAME,ASCII,LENGTH,LIST))
39(
40 CHAR_%NAME EQU %CHARCNT
41 %SET(CHARBEG,%CHARBEG+%LENGTH+1)
42)
43
44; MENU CISELNEHO PARAMETRU
45%*DEFINE(MenuNbrPar(NAME,DISP_NBR,PARAM,TEXT)) LOCAL MENULEN
46(
47RSEG PARTXT_SEG
48_%NAME:
49 DB %TEXT,0
50
51RSEG MENUCODE
52%SET(MENUCNT,%MENUCNT+1)
53%NAME:
54 DB MENUNBR OR %MENULEN ; CISLO BEZ PODMENU
55 DB %DISP_NBR
56 DW %PARAM
57 DW _%NAME
58%MENULEN EQU $-%NAME
59
60)
61
62; MENU CISELNEHO PARAMETRU
63%*DEFINE(MenuNbrPar(NAME,DISP_NBR,PARAM,TEXT)) LOCAL MENULEN
64(
65RSEG PARTXT_SEG
66_%NAME:
67 DB %TEXT,0
68
69RSEG MENUCODE
70%SET(MENUCNT,%MENUCNT+1)
71%NAME:
72 DB MENUNBR OR %MENULEN ; CISLO BEZ PODMENU
73 DB %DISP_NBR
74 DW %PARAM
75 DW _%NAME
76%MENULEN EQU $-%NAME
77
78)
79
80%*DEFINE(MenuStNbrPar(NAME,DISP_NBR,PARAM,TEXT,CNT)) LOCAL MENULEN
81(
82RSEG PARTXT_SEG
83_%NAME:
84 DB %TEXT,0
85
86RSEG MENUCODE
87%SET(MENUCNT,%MENUCNT+1)
88%NAME:
89 DB MENUSTNBR OR %MENULEN ; CISLO S PODMENU S00-S23
90 DB %DISP_NBR
91 DW %PARAM
92 DW _%NAME
93 DB %CNT
94%MENULEN EQU $-%NAME
95)
96
97%*DEFINE(MenuChrPar(NAME,DISP_NBR,PARAM,TEXT)) LOCAL MENULEN
98(
99RSEG PARTXT_SEG
100_%NAME:
101 DB %TEXT,0
102
103RSEG MENUCODE
104%SET(MENUCNT,%MENUCNT+1)
105%NAME:
106 DB MENUBMP OR %MENULEN ; RETEZEC ZNAKU BEZ PODMENU
107 DB %DISP_NBR
108 DW %PARAM
109 DW _%NAME
110 DW
111%MENULEN EQU $-%NAME
112)
113
114%*DEFINE(MenuStChrPar(NAME,DISP_NBR,PARAM,TEXT)) LOCAL MENULEN
115(
116RSEG PARTXT_SEG
117_%NAME:
118 DB %TEXT,0
119
120RSEG MENUCODE
121%SET(MENUCNT,%MENUCNT+1)
122%NAME:
123 DB MENUSTBMP OR %MENULEN ; RETEZEC ZNAKU S PODMENU S00-S23
124 DB %DISP_NBR
125 DW %PARAM
126 DW _%NAME
127%MENULEN EQU $-%NAME
128)
129
130%*DEFINE(MenuBmpPar(NAME,DISP_NBR,PARAM,TEXT)) LOCAL MENULEN
131(
132RSEG PARTXT_SEG
133_%NAME:
134 DB %TEXT,0
135
136RSEG MENUCODE
137%SET(MENUCNT,%MENUCNT+1)
138%NAME:
139 DB MENUARROWS OR %MENULEN ; RETEZEC ZNAKU BEZ PODMENU
140 DB %DISP_NBR
141 DW %PARAM
142 DW _%NAME
143%MENULEN EQU $-%NAME
144)
145
146
147%*DEFINE(MenuCmd(NAME,DISP_CHAR,DISP_NBR,FCEPTR,DEF,MIN,MAX,TEXT)) LOCAL MENULEN
148(
149RSEG PARTXT_SEG
150_%NAME:
151 DB %TEXT,0
152
153RSEG MENUCODE
154%SET(MENUCNT,%MENUCNT+1)
155%NAME:
156 DB (0 SHL 7)+(0 SHL 6)+%MENULEN ; CISLO BEZ PODMENU
157 DB %DISP_CHAR
158 DB %DISP_NBR
159 DW %FCEPTR
160 DB %DEF
161 DB %MIN
162 DB %MAX
163 DW _%NAME
164%MENULEN EQU $-%NAME
Note: See TracBrowser for help on using the repository browser.