CML.INC 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. ************************************************************************
  2. * *
  3. * [[[ NOP ]]] EASY CML MACRO DEFINITIONS *
  4. * by S.OKADA from 92/01/07 Tue 14:56 *
  5. * *
  6. ************************************************************************
  7. ;
  8. ; *** nop mess out ***
  9. ;
  10. ; No 0 command end
  11. FIX_END MACRO NEXT,SAVE_CML
  12. MODE SET 0
  13. IFC 'RAM',\1
  14. MODE SET 8000H
  15. ENDC
  16. IFC 'SAVE',\2
  17. MODE SET MODE+100H
  18. ENDC
  19. DC.W MODE
  20. ENDM
  21. ; No 1 data format
  22. FIX_FORMAT MACRO TYPE,PARM
  23. MODE SET 301H
  24. IFC 'B',\0
  25. MODE SET 101H
  26. ENDC
  27. IFC 'CODE',\1
  28. MODE SET MODE-100H
  29. ENDC
  30. DC.W MODE,PARM
  31. ENDM
  32. FIX_FORMAT_T MACRO TYPE
  33. MODE SET 301H
  34. IFC 'B',\0
  35. MODE SET 101H
  36. ENDC
  37. IFC 'CODE',\1
  38. MODE SET MODE-100H
  39. ENDC
  40. DC.W MODE
  41. ENDM
  42. FIX_FORMAT_TP MACRO PARM
  43. DC.W PARM
  44. ENDM
  45. ; No 2 auto increment value
  46. FIX_AUTO MACRO INC
  47. DC.W INC*100H+2
  48. ENDM
  49. ; No 3 output v-ram address
  50. FIX_ADRS MACRO X,Y
  51. DC.W 3
  52. IFEQ NARG-1
  53. DC.W X
  54. ELSEC
  55. DC.W 7000H+20H*X+Y
  56. ENDM
  57. FIX_ADRS_T MACRO
  58. DC.W 3
  59. ENDM
  60. FIX_ADRS_TP MACRO X,Y
  61. IFEQ NARG-1
  62. DC.W X
  63. ELSEC
  64. DC.W 7000H+20H*X+Y
  65. ENDM
  66. ; No 4 get data address and data output
  67. FIX_DATA_ADRS MACRO ADRS
  68. DC.W 4
  69. DC.L ADRS
  70. ENDM
  71. ; No 5 address increment
  72. ; No 14 address increment byte type
  73. FIX_NEXT MACRO X,Y
  74. MODE SET X
  75. IFEQ NARG-2
  76. MODE SET X*20H+(Y)
  77. ENDC
  78. IFGE MODE+80H
  79. IFLT MODE-80H
  80. DC.W MODE*100H+14H
  81. ELSEC
  82. DC.W 5,MODE
  83. ENDC
  84. ELSEC
  85. DC.W 5,MODE
  86. ENDC
  87. ENDM
  88. FIX_NEXT_T MACRO
  89. DC.W 5
  90. ENDM
  91. FIX_NEXT_TP MACRO X,Y
  92. DC.W X*20H+(Y)
  93. ENDM
  94. NEXT_DIRECT MACRO X,Y
  95. MODE SET X
  96. IFEQ NARG-2
  97. MODE SET X*20H+(Y)
  98. ENDC
  99. IFGE MODE+80H
  100. IFLT MODE-80H
  101. DC.W MODE*100H+14H,7
  102. ELSEC
  103. DC.W 5,MODE,7
  104. ENDC
  105. ELSEC
  106. DC.W 5,MODE,7
  107. ENDC
  108. ENDM
  109. ; No 6 data continue output
  110. FIX_DATA_CONT MACRO
  111. DC.W 6
  112. ENDM
  113. ; No 7 direct data
  114. FIX_DIRECT_DATA MACRO
  115. DC.W 7
  116. ENDM
  117. ; No 8 common Fix 8*16 font output
  118. FIX_DOUBLE MACRO HI
  119. DC.W HI*100H+8
  120. ENDM
  121. ; No 9 common Fix 8*16 font output
  122. FIX_KANA MACRO HI
  123. DC.W HI*100H+9
  124. ENDM
  125. ; No 9 common Fix 16*16 font output
  126. FIX_KNJ MACRO HI
  127. DC.W HI*100H+18H
  128. ENDM
  129. ; No 0A sub data call
  130. FIX_CALL MACRO ADRS
  131. DC.W 0AH
  132. DC.L ADRS
  133. ENDM
  134. ; No 0B sub data return
  135. FIX_RETURN MACRO
  136. DC.W 0BH
  137. ENDM
  138. ; No 0C same data output
  139. FIX_SAME MACRO COUNT,CODE
  140. DC.W COUNT*100H+0CH,CODE
  141. ENDM
  142. ; No 0D increment data output
  143. FIX_INC_OUT MACRO COUNT,CODE
  144. DC.W COUNT*100H+0DH,CODE
  145. ENDM
  146. ; No 0E A6 work change
  147. FIX_WORK_CHANGE MACRO TARGET
  148. IFC 'MASTER',\1
  149. DC.W 800EH
  150. ELSEC
  151. DC.W TARGET*100H+0EH
  152. ENDC
  153. ENDM
  154. ; No 0F command table call
  155. FIX_TABLE MACRO WORK,OFS,TABLE
  156. IFC 'A6',\1
  157. DC.W 0FH
  158. ELSEC
  159. DC.W 10FH
  160. ENDC
  161. DC.W OFS
  162. DC.W TABLE-*
  163. ENDM
  164. ; No 17 single command table call
  165. FIX_TABLE_SING MACRO WORK,OFS,TABLE
  166. IFC 'A6',\1
  167. DC.W 17H
  168. ELSEC
  169. DC.W 117H
  170. ENDC
  171. DC.W OFS
  172. DC.W TABLE-*
  173. ENDM
  174. WORD_TBL MACRO ADRS
  175. DC.W ADRS-*
  176. ENDM
  177. ; No 10 command pointer to cml
  178. FIX_CML_POINT MACRO
  179. DC.W 10H
  180. ENDM
  181. ; No 11 cml pointer save
  182. FIX_CML_SAVE MACRO
  183. DC.W 11H
  184. ENDM
  185. ; No 12 BCD convert data table set
  186. FIX_BCD_TABLE MACRO ADRS
  187. DC.W 12H
  188. DC.L ADRS
  189. ENDM
  190. ; No 13 BCD data output by BCD table
  191. FIX_BCD_OUT MACRO ZERO,BASE,OFS,START,COUNT,X,Y,HI
  192. MODE SET 8013H+(COUNT-1)*100H
  193. IFC \0,'B'
  194. MODE SET MODE-8000H
  195. ENDC
  196. IFC 'MASK',\1
  197. MODE SET MODE+4000H
  198. ENDC
  199. IFC 'A6',\2
  200. MODE SET MODE+1000H
  201. ENDC
  202. IFC 'LOW',\4
  203. MODE SET MODE+2000H
  204. ENDC
  205. DC.W MODE,7000H+20H*X+Y,OFS
  206. DC.B HI,0
  207. ENDM
  208. ; No 15 fix continue output
  209. FIX_CONT_MODE MACRO
  210. DC.W 15H
  211. ENDM
  212. ; No 16 C language printf
  213. FIX_PRINTF MACRO
  214. DC.W 16H
  215. ENDM
  216. PARM MACRO COUNT,ADRS
  217. DC.B '%',COUNT
  218. DC.W ADRS-?A5
  219. ENDM
  220. ;
  221. ; *** fix countinue command ***
  222. ;
  223. ; CF No 00 data end
  224. CF_END MACRO
  225. DC.B CTRL_CH,0
  226. ENDM
  227. ; CF No 01 first parm set
  228. CF_FIRST MACRO BX,BY,CH_INC,LINE_INC,ATTR
  229. DC.B CTRL_CH,1
  230. DC.W 7000H+20H*BX+BY
  231. DC.W CH_INC,LINE_INC,ATTR
  232. ENDM
  233. ; CF No 02 line feed
  234. CF_LINE_FEED MACRO
  235. DC.B CTRL_CH,02
  236. ENDM
  237. ; CF No 03 next page
  238. CF_NEXT_PAGE MACRO
  239. DC.B CTRL_CH,03
  240. ENDM
  241. ; CF No 04 temporary 1 line clear
  242. CF_LINE_CLEAR MACRO X
  243. DC.B CTRL_CH,04,X
  244. ENDM
  245. ; CF No 05 page clear
  246. CF_PAGE_CLEAR MACRO X,Y
  247. DC.B CTRL_CH,05,X,Y
  248. ENDM
  249. ; CF No 06 table sub data call with d16(A5)
  250. ; CF No 07 table sub data call with d16(A6)
  251. CF_TABLE_SUB MACRO BASE,OFS,TABLE
  252. DC.B CTRL_CH
  253. IFC 'A5',\1
  254. DC.B 7
  255. ELSEC
  256. DC.B 6
  257. ENDC
  258. DC.W OFS
  259. DC.W TABLE-*
  260. ENDM
  261. ; CF No 08 return from sub data
  262. CF_SUB_RETURN MACRO
  263. DC.B CTRL_CH,08
  264. ENDM
  265. ; CF No 09 word output
  266. CF_WORD_OUT MACRO CHH,CHL
  267. DC.B CTRL_CH,09,CHH,CHL
  268. ENDM
  269. ; CF No 0A CHAR_ATTR change
  270. CF_ATTR_CHANGE MACRO CHH
  271. DC.B CTRL_CH,0AH,CHH
  272. ENDM
  273.