home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / Geneve / 9640news / CAT15 / GPLMVX.ARK < prev    next >
Text File  |  2006-10-19  |  6KB  |  187 lines

  1. ?
  2. Listed below are  a number of examples of the GPL  MOVE statement. This is a
  3. LIST file generated by a GPL Assembler.
  4.  
  5. When the GPL Interpreter talks to  CPU Memory it offsets the CPU  address by
  6. >8300.   This can be seen in the  OPCODES for the third move statement which
  7. breaks down as follows:
  8.  
  9. >35         MOVE
  10. >1234       >1234 bytes
  11. >8F         to   Cpu Memory (non-indexed)  (AF = Vdp memory)
  12. >9D00       at >2000 (>9D00+>8300=>2000)
  13. >8F         from Cpu Memory (non-indexed)
  14. >1D00       at >A000 (>1D00+>8300=>A000)
  15.  
  16. When the GPL Interpreter talks to CPU Scratch Pad Memory Below >8380 or when
  17. a Scratch  Pad address  is used  for indexing  it is  referenced by one byte
  18. (i.e. >831F will appear as >1F in the Opcode).
  19.  
  20. In the Examples listed below:  G@ = Grom/Gram Memory
  21.                                V@ = Vdp Memory and
  22.                                 @ = Cpu Memory
  23.  
  24.  
  25. 99/4 GPL-ASSEMBLER
  26. GROM 3 - MOVE TEST
  27. <0001>
  28. <0002>                      GROM 3
  29. <0003>                      AORG 0
  30. <0004>
  31. <0005>               * GPL  MOVE Statements
  32. <0006>               *
  33. <0007>               *      MOVE #bytes,source,destination
  34. <0008>               *
  35. <0009> 6000 21,12,34        MOVE >1234,G@>C000,G@>E000
  36.        6003 E0,00,C0
  37.        6006 00
  38. <0010> 6007 35,12,34        MOVE >1234,V@>1000,V@>3000
  39.        600A AF,30,00
  40.        600D AF,10,00
  41. <0011> 6010 35,12,34        MOVE >1234,@>A000,@>2000
  42.        6013 8F,9D,00
  43.        6016 8F,1D,00
  44. <0012> 6019 35,12,34        MOVE >1234,@>A000,@>831F
  45.        601C 1F,8F,1D
  46.        601F 00
  47. <0013> 6020 35,12,34        MOVE >1234,@>A000,@>839E
  48.        6023 80,9E,8F
  49.        6026 1D,00
  50. <0014>
  51. <0015> 6028 31,12,34        MOVE >1234,G@>C000,V@>3000
  52.        602B AF,30,00
  53.        602E C0,00
  54. <0016> 6030 31,12,34        MOVE >1234,G@>C000,@>2000
  55.        6033 8F,9D,00
  56.        6036 C0,00
  57. <0017> 6038 31,12,34        MOVE >1234,G@>C000,@>831F
  58.        603B 1F,C0,00
  59. <0018> 603E 31,12,34        MOVE >1234,G@>C000,@>839E
  60.        6041 80,9E,C0
  61.        6044 00
  62. <0019>
  63. <0020> 6045 25,12,34        MOVE >1234,V@>1000,G@>C000
  64.        6048 C0,00,AF
  65.        604B 10,00
  66. <0021> 604D 35,12,34        MOVE >1234,V@>1000,@>2000
  67.        6050 8F,9D,00
  68.        6053 AF,10,00
  69. <0022> 6056 35,12,34        MOVE >1234,V@>1000,@>831F
  70.        6059 1F,AF,10
  71.        605C 00
  72. <0023> 605D 35,12,34        MOVE >1234,V@>1000,@>839E
  73.        6060 80,9E,AF
  74.        6063 10,00
  75. <0024>
  76. <0025> 6065 25,12,34        MOVE >1234,@>2000,G@>C000
  77.        6068 C0,00,8F
  78.        606B 9D,00
  79. <0026> 606D 35,12,34        MOVE >1234,@>2000,V@>1000
  80.        6070 AF,10,00
  81.        6073 8F,9D,00
  82. <0027> 6076 35,12,34        MOVE >1234,@>831F,@>832F
  83.        6079 2F,1F
  84. <0028> 607B 35,12,34        MOVE >1234,@>839E,@>83AE
  85.        607E 80,AE,80
  86.        6081 9E
  87. <0029> 6082 35,12,34        MOVE >1234,@>839E,@>831F
  88.        6085 1F,80,9E
  89. <0030>
  90. <0031>               * INDEXED MOVES -------------------------------
  91. <0032>
  92. <0033> 831F          TEMP1  EQU  >831F
  93. <0034> 839E          TEMP2  EQU  >839E
  94. <0035>
  95. <0036> 6088 29,12,34        MOVE >1234,G@>C000,G@2(@TEMP2)
  96.        608B 00,02,9E
  97.        608E C0,00
  98. <0037> 6090 31,12,34        MOVE >1234,G@>C000,V@2(@TEMP2)
  99.        6093 E0,02,9E
  100.        6096 C0,00
  101. <0038> 6098 31,12,34        MOVE >1234,G@>C000,@2(@TEMP2)
  102.        609B CF,7D,02
  103.        609E 9E,C0,00
  104. <0039> 60A1 31,12,34        MOVE >1234,G@>C000,@>830F(@TEMP1)
  105.        60A4 C0,0F,1F
  106.        60A7 C0,00
  107. <0040> 60A9 2B,12,34        MOVE >1234,G@1(@TEMP1),G@2(@TEMP2)
  108.        60AC 00,02,9E
  109.        60AF 00,01,1F
  110. <0041>
  111. <0042> 60B2 2D,12,34        MOVE >1234,@>A000,G@2(@TEMP2)
  112.        60B5 00,02,9E
  113.        60B8 8F,1D,00
  114. <0043> 60BB 35,12,34        MOVE >1234,V@1(@TEMP1),V@2(@TEMP2)
  115.        60BE E0,02,9E
  116.        60C1 E0,01,1F
  117. <0044> 60C4 35,12,34        MOVE >1234,@1(@TEMP1),@2(@TEMP2)
  118.        60C7 CF,7D,02
  119.        60CA 9E,CF,7D
  120.        60CD 01,1F
  121. <0045>
  122. <0046>               * INDIRECT MOVES ------------------------------
  123. <0047>
  124. <0048> 60CF 31,12,34        MOVE >1234,G@>C000,V*TEMP2
  125.        60D2 B0,9E,C0
  126.        60D5 00
  127. <0049> 60D6 31,12,34        MOVE >1234,G@>C000,*TEMP2
  128.        60D9 90,9E,C0
  129.        60DC 00
  130. <0050> 60DD 31,12,34        MOVE >1234,G@>C000,*>830F(@TEMP1)
  131.        60E0 D0,0F,1F
  132.        60E3 C0,00
  133. <0051> 60E5 33,12,34        MOVE >1234,G@1(@TEMP1),*TEMP2
  134.        60E8 90,9E,00
  135.        60EB 01,1F
  136. <0052>
  137. <0053> 60ED 35,12,34        MOVE >1234,V*1(@TEMP1),V*2(@TEMP2)
  138.        60F0 FF,7D,02
  139.        60F3 9E,FF,7D
  140.        60F6 01,1F
  141. <0054> 60F8 35,12,34        MOVE >1234,*TEMP1,*TEMP2
  142.        60FB 90,9E,90
  143.        60FE 1F
  144. <0055>
  145. <0056>                      END
  146.  
  147. ----------------------------------------------------------------------------
  148.  
  149.                                  GPL XMLs
  150.  
  151. If you are using  Gram to store an Assembly  file in, that is in  turn MOVED
  152. out by a CALL  or a GPL program  (patch) you can start  the Assembly program
  153. with a GPL XML statement.
  154.  
  155. The Opcode for GPL XML is >OF xx - where xx  represents the XML table to use
  156. for the  start vector (See the Explorer Manual  page 77 for the XML tables).
  157. For example let's say you used a GPL MOVE to move an 8K assembly program out
  158. of Gram 7 (>E000) to high Memory Expansion and now you want to go out of GPL
  159. and  execute your  Assembly program.  Let's say  that your  Assembly program
  160. starts at address  >A040, this could  be the code  you could use  to do this
  161. task.
  162.  
  163. 31 20 00           MYPROG     MOVE >2000,G@>E000,@>A000
  164. 8F 1D 00
  165. E0 00
  166.  
  167. BF 00 A0                      DST  >A040,@>8300       (store start address)
  168. 40
  169.  
  170. 0F F0                         XML >F0    (go to >8300 to get start address)
  171.  
  172. 00                            RTN
  173.  
  174. When your Assembly program is  finished you can then B @>006A to  go back to
  175. the GPL Interpreter. Don't forget to reset the Grom Address if your Assembly
  176. program changed it. When the GPL Interpreter starts back up it will grab the
  177. >00 opcode (RTN) and  return from the CALL MYPROG that  you set up somewhere
  178. else in Gram to start  the above routine.  By the way, the Opcode for a CALL
  179. is >06  so the CALL MYPROG  would be 06 xx  xx where xx xx  = the address in
  180. Gram where you placed the above code.
  181.  
  182. Have Fun.                    ------ MG ------
  183.  
  184. Download complete.  Turn off Capture File.
  185.  
  186.  
  187.