home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Games / WHDLoad / Include / whdload.i < prev    next >
Text File  |  2000-08-07  |  17KB  |  522 lines

  1. ;*---------------------------------------------------------------------------
  2. ;  :Module.    whdload.i
  3. ;  :Contens.    include file for WHDLoad and Slaves
  4. ;  :Author.    Bert Jahn
  5. ;  :EMail.    wepl@whdload.org
  6. ;  :Address.    Franz-Liszt-Straße 16, Rudolstadt, 07404, Germany
  7. ;  :Version.    $Id: whdload.i 12.0 2000/08/07 22:30:54 jah Exp jah $
  8. ;  :History.    11.04.99 marcos moved to separate include file
  9. ;        08.05.99 resload_Patch added
  10. ;        09.03.00 new stuff for whdload v11
  11. ;        10.07.00 new stuff for whdload v12
  12. ;  :Copyright.    © 1996-2000 Bert Jahn, All Rights Reserved
  13. ;  :Language.    68000 Assembler
  14. ;  :Translator.    Barfly 2.9, Asm-Pro 1.16, PhxAss 4.38
  15. ;---------------------------------------------------------------------------*
  16.  
  17.  IFND WHDLOAD_I
  18. WHDLOAD_I=1
  19.  
  20.     IFND    EXEC_EXECBASE_I
  21.     INCLUDE    exec/execbase.i
  22.     ENDC
  23.     IFND    EXEC_TYPES_I
  24.     INCLUDE    exec/types.i
  25.     ENDC
  26.     IFND    GRAPHICS_MODEID_I
  27.     INCLUDE    graphics/modeid.i
  28.     ENDC
  29.     IFND    UTILITY_TAGITEM_I
  30.     INCLUDE    utility/tagitem.i
  31.     ENDC
  32.  
  33. ;=============================================================================
  34. ;    misc
  35. ;=============================================================================
  36.  
  37. SLAVE_HEADER    MACRO
  38.         moveq    #-1,d0
  39.         rts
  40.         dc.b    "WHDLOADS"
  41.         ENDM
  42.  
  43. ;=============================================================================
  44. ;    return-values for termination (resload_Abort)
  45. ;=============================================================================
  46.  
  47. TDREASON_OK        = -1    ;normal termination
  48. TDREASON_DOSREAD    = 1    ;error caused by resload_ReadFile
  49.                 ; primary   = dos errorcode
  50.                 ; secondary = file name
  51. TDREASON_DOSWRITE    = 2    ;error caused by resload_SaveFile or
  52.                 ;resload_SaveFileOffset
  53.                 ; primary   = dos errorcode
  54.                 ; secondary = file name
  55. TDREASON_DEBUG        = 5    ;cause WHDLoad to make a coredump and quit
  56.                 ; primary   = PC (writing to dump files)
  57.                 ; secondary = SR (writing to dump files)
  58. TDREASON_DOSLIST    = 6    ;error caused by resload_ListFiles
  59.                 ; primary   = dos errorcode
  60.                 ; secondary = directory name
  61. TDREASON_DISKLOAD    = 7    ;error caused by resload_DiskLoad
  62.                 ; primary   = dos errorcode
  63.                 ; secondary = disk number
  64. TDREASON_DISKLOADDEV    = 8    ;error caused by resload_DiskLoadDev
  65.                 ; primary   = trackdisk errorcode
  66. TDREASON_WRONGVER    = 9    ;an version check (e.g. crc16) has detected an
  67.                 ;unsupported version of the installed program
  68. TDREASON_OSEMUFAIL    = 10    ;error in the OS emulation module
  69.                 ; primary   = subsystem (e.g. "exec.library")
  70.                 ; secondary = error number (e.g. _LVOAllocMem)
  71. ; version 7
  72. TDREASON_REQ68020    = 11    ;installed program requires a MC68020
  73. TDREASON_REQAGA        = 12    ;installed program requires the AGA chip set
  74. TDREASON_MUSTNTSC    = 13    ;installed program needs NTSC videomode to run
  75. TDREASON_MUSTPAL    = 14    ;installed program needs PAL videomode to run
  76. ; version 8
  77. TDREASON_MUSTREG    = 15    ;WHDLoad must be registered
  78. TDREASON_DELETEFILE    = 27    ;error caused by resload_DeleteFile
  79.                 ; primary   = dos errorcode
  80.                 ; secondary = file name
  81.  
  82. ;=============================================================================
  83. ; tagitems for the resload_Control function
  84. ;=============================================================================
  85.  
  86.  ENUM    TAG_USER+$8000000
  87.  EITEM    WHDLTAG_ATTNFLAGS_GET    ;get info about current CPU/FPU/MMU
  88.  EITEM    WHDLTAG_ECLOCKFREQ_GET    ;get frequency custom chips operate on
  89.  EITEM    WHDLTAG_MONITOR_GET    ;get the used monitor/video mode
  90.                 ;(NTSC_MONITOR_ID or PAL_MONITOR_ID)
  91.  EITEM    WHDLTAG_Private1
  92.  EITEM    WHDLTAG_Private2
  93.  EITEM    WHDLTAG_Private3
  94.  EITEM    WHDLTAG_BUTTONWAIT_GET    ;get value of WHDLoad option ButtonWait/S (0/-1)
  95.  EITEM    WHDLTAG_CUSTOM1_GET    ;get value of WHDLoad option Custom1/N (integer)
  96.  EITEM    WHDLTAG_CUSTOM2_GET    ;get value of WHDLoad option Custom2/N (integer)
  97.  EITEM    WHDLTAG_CUSTOM3_GET    ;get value of WHDLoad option Custom3/N (integer)
  98.  EITEM    WHDLTAG_CUSTOM4_GET    ;get value of WHDLoad option Custom4/N (integer)
  99.  EITEM    WHDLTAG_CUSTOM5_GET    ;get value of WHDLoad option Custom5/N (integer)
  100. ; version 7
  101.  EITEM    WHDLTAG_CBSWITCH_SET    ;set a function to be executed during switch
  102.                 ;from operating system to installed program
  103.  EITEM    WHDLTAG_CHIPREVBITS_GET    ;get info about current custom chip set
  104. ; version 8
  105.  EITEM    WHDLTAG_IOERR_GET    ;get last dos errorcode
  106.  EITEM    WHDLTAG_Private4
  107. ; version 9
  108.  EITEM    WHDLTAG_CBAF_SET    ;set a function to be executed when an access
  109.                 ;fault exception occurs
  110.  EITEM    WHDLTAG_VERSION_GET    ;get WHDLoad major version number
  111.  EITEM    WHDLTAG_REVISION_GET    ;get WHDLoad minor version number
  112.  EITEM    WHDLTAG_BUILD_GET    ;get WHDLoad build number
  113.  EITEM    WHDLTAG_TIME_GET    ;get current time and date
  114. ; version 11
  115.  EITEM    WHDLTAG_BPLCON0_GET    ;get system bplcon0
  116. ; version 12
  117.  EITEM    WHDLTAG_KEYTRANS_GET    ;get pointer to a 128 byte table to convert
  118.                 ;rawkey's to ascii-chars
  119.  
  120. ;=============================================================================
  121. ;    structure returned by WHDLTAG_TIME_GET
  122. ;=============================================================================
  123.  
  124.     STRUCTURE whdload_time,0
  125.         ULONG    whdlt_days    ;days since 1.1.1978
  126.         ULONG    whdlt_mins    ;minutes since last day
  127.         ULONG    whdlt_ticks    ;1/50 seconds since last minute
  128.         UBYTE    whdlt_year    ;78..77 (1978..2077)
  129.         UBYTE    whdlt_month    ;1..12
  130.         UBYTE    whdlt_day    ;1..31
  131.         UBYTE    whdlt_hour    ;0..23
  132.         UBYTE    whdlt_min    ;0..59
  133.         UBYTE    whdlt_sec    ;0..59
  134.         LABEL    whdlt_SIZEOF
  135.  
  136. ;=============================================================================
  137. ; Slave        Version 1..3
  138. ;=============================================================================
  139.  
  140.     STRUCTURE    WHDLoadSlave,0
  141.     STRUCT    ws_Security,4
  142.     STRUCT    ws_ID,8        ;"WHDLOADS"
  143.     UWORD    ws_Version    ;required WHDLoad version
  144.     UWORD    ws_Flags    ;see below
  145.     ULONG    ws_BaseMemSize    ;size of required memory (multiple of $1000)
  146.     ULONG    ws_ExecInstall    ;must be 0
  147.     RPTR    ws_GameLoader    ;Slave code, called by WHDLoad
  148.     RPTR    ws_CurrentDir    ;subdirectory for data files
  149.     RPTR    ws_DontCache    ;pattern for files not to cache
  150.  
  151. ;=============================================================================
  152. ; additional    Version 4..7
  153. ;=============================================================================
  154.  
  155.     UBYTE    ws_keydebug    ;raw key code to quit with debug
  156.                 ;works only if vbr is moved !
  157.                 ;=0 means no key
  158.     UBYTE    ws_keyexit    ;raw key code to exit
  159.                 ;works only if vbr is moved !
  160.                 ;=0 means no key
  161.  
  162. ;=============================================================================
  163. ; additional    Version 8..9
  164. ;=============================================================================
  165.  
  166.     ULONG    ws_ExpMem    ;size of required expansions memory, during
  167.                 ;initialisation overwritten by WHDLoad with
  168.                 ;address of the memory (multiple of $1000)
  169.                 ;if negative it is optional
  170.  
  171. ;=============================================================================
  172. ; additional    Version 10
  173. ;=============================================================================
  174.  
  175.     RPTR    ws_name        ;name of the installed program
  176.     RPTR    ws_copy        ;year and owner of the copyright
  177.     RPTR    ws_info        ;additional informations (author, version...)
  178.     LABEL    ws_SIZEOF
  179.  
  180. ;=============================================================================
  181. ; Flags for ws_Flags
  182. ;=============================================================================
  183.  
  184.     BITDEF WHDL,Disk,0    ;means diskimages are used by the Slave
  185.                 ;starting WHDLoad 0.107 obsolete
  186.     BITDEF WHDL,NoError,1    ;forces WHDLoad to abort the installed program
  187.                 ;if error during resload_#? function occurs
  188.     BITDEF WHDL,EmulTrap,2    ;forward "trap #n" exceptions to the handler
  189.                 ;of the installed program
  190.     BITDEF WHDL,NoDivZero,3    ;ignore division by zero exceptions
  191. ; version 7
  192.     BITDEF WHDL,Req68020,4    ;abort if no MC68020 or better is available
  193.     BITDEF WHDL,ReqAGA,5    ;abort if no AGA chipset is available
  194. ; version 8
  195.     BITDEF WHDL,NoKbd,6    ;says WHDLoad that it doesn't should get the
  196.                 ;keycode from the keyboard in conjunction with
  197.                 ;NoVBRMove, must be used if the installed
  198.                 ;program checks the keyboard from the VBI
  199.     BITDEF WHDL,EmulLineA,7    ;forward "line-a" exceptions to the handler
  200.                 ;of the installed program
  201. ; version 9
  202.     BITDEF WHDL,EmulTrapV,8    ;forward "trapv" exceptions to the handler
  203.                 ;of the installed program
  204. ; version 11
  205.     BITDEF WHDL,EmulChk,9    ;forward "chk, chk2" exceptions to the handler
  206.                 ;of the installed program
  207.     BITDEF WHDL,EmulPriv,10    ;forward 'privilege violation' exceptions to
  208.                 ;the handler of the installed program
  209. ; version 12
  210.     BITDEF WHDL,EmulLineF,11 ;forward "line-f" exceptions to the handler
  211.                 ;of the installed program
  212.  
  213. ;=============================================================================
  214. ; properties for resload_SetCPU
  215. ;=============================================================================
  216.  
  217. WCPUF_Base    = 3        ;BaseMem mask
  218. WCPUF_Base_NCS    = 0        ;BaseMem = non cacheable serialized
  219. WCPUF_Base_NC    = 1        ;BaseMem = non cacheable
  220. WCPUF_Base_WT    = 2        ;BaseMem = cacheable write trough
  221. WCPUF_Base_CB    = 3        ;BaseMem = cacheable copyback
  222. WCPUF_Exp    = 12        ;ExpMem mask
  223. WCPUF_Exp_NCS    = 0        ;ExpMem = non cacheable serialized
  224. WCPUF_Exp_NC    = 4        ;ExpMem = non cacheable
  225. WCPUF_Exp_WT    = 8        ;ExpMem = cacheable write trough
  226. WCPUF_Exp_CB    = 12        ;ExpMem = cacheable copyback
  227. WCPUF_Slave    = 48        ;Slave mask
  228. WCPUF_Slave_NCS    = 0        ;Slave = non cacheable serialized
  229. WCPUF_Slave_NC    = 16        ;Slave = non cacheable
  230. WCPUF_Slave_WT    = 32        ;Slave = cacheable write trough
  231. WCPUF_Slave_CB    = 48        ;Slave = cacheable copyback
  232.  
  233.     BITDEF WCPU,IC,8    ;instruction cache (20-60)
  234.     BITDEF WCPU,DC,9    ;data cache (30-60)
  235.     BITDEF WCPU,NWA,10    ;disable write allocation (30)
  236.     BITDEF WCPU,SB,11    ;store buffer (60)
  237.     BITDEF WCPU,BC,12    ;branch cache (60)
  238.     BITDEF WCPU,SS,13    ;superscalar dispatch (60)
  239.     BITDEF WCPU,FPU,14    ;enable fpu (60)
  240.  
  241. WCPUF_All    = WCPUF_Base!WCPUF_Exp!WCPUF_Slave!WCPUF_IC!WCPUF_DC!WCPUF_NWA!WCPUF_SB!WCPUF_BC!WCPUF_SS!WCPUF_FPU
  242.  
  243. ;=============================================================================
  244. ; resload_#? functions
  245. ; a JMP-tower inside WHDLoad (similar to a library)
  246. ; base is given on startup via A0
  247. ;=============================================================================
  248.  
  249.     STRUCTURE    ResidentLoader,0
  250.     ULONG    resload_Install        ;private
  251.     ULONG    resload_Abort
  252.         ; return to operating system
  253.         ; IN: (a7) = ULONG  reason for aborting
  254.         ;   (4,a7) = ULONG  primary error code
  255.         ;   (8,a7) = ULONG  secondary error code
  256.         ; ATTENTION this routine must called via JMP! (not JSR)
  257.     ULONG    resload_LoadFile
  258.         ; load file to memory
  259.         ; IN :    a0 = CPTR   filename
  260.         ;    a1 = APTR   address
  261.         ; OUT :    d0 = ULONG  success (size of file)
  262.         ;    d1 = ULONG  dos errorcode
  263.     ULONG    resload_SaveFile
  264.         ; write memory to file
  265.         ; IN :    d0 = LONG   size
  266.         ;    a0 = CPTR   filename
  267.         ;    a1 = APTR   address
  268.         ; OUT :    d0 = BOOL   success
  269.         ;    d1 = ULONG  dos errorcode
  270.     ULONG    resload_SetCACR
  271.         ; set cachebility for BaseMem
  272.         ; IN :    d0 = ULONG  new setup
  273.         ;    d1 = ULONG  mask
  274.         ; OUT :    d0 = ULONG  old setup
  275.     ULONG    resload_ListFiles
  276.         ; list filenames of directory
  277.         ; IN :    d0 = ULONG  buffer size
  278.         ;    a0 = CPTR   name of directory to scan
  279.         ;    a1 = APTR   buffer (must be located in Slave)
  280.         ; OUT :    d0 = ULONG  amount of names in buffer
  281.         ;    d1 = ULONG  dos errorcode
  282.     ULONG    resload_Decrunch
  283.         ; uncompress data in memory
  284.         ; IN :    a0 = APTR   source
  285.         ;    a1 = APTR   destination (can be equal to source)
  286.         ; OUT :    d0 = ULONG  uncompressed size
  287.     ULONG    resload_LoadFileDecrunch
  288.         ; load file and uncompress
  289.         ; IN :    a0 = CPTR   filename
  290.         ;    a1 = APTR   address
  291.         ; OUT :    d0 = ULONG  success (size of file)
  292.         ;    d1 = ULONG  dos errorcode
  293.     ULONG    resload_FlushCache
  294.         ; clear CPU caches
  295.         ; IN :    -
  296.         ; OUT :    -
  297.     ULONG    resload_GetFileSize
  298.         ; get size of a file
  299.         ; IN :    a0 = CPTR   filename
  300.         ; OUT :    d0 = ULONG  size of file
  301.     ULONG    resload_DiskLoad
  302.         ; load part from diskimage
  303.         ; IN :    d0 = ULONG  offset
  304.         ;    d1 = ULONG  size
  305.         ;    d2 = ULONG  disk number
  306.         ;    a0 = APTR   destination
  307.         ; OUT :    d0 = BOOL   success
  308.         ;    d1 = ULONG  dos errorcode
  309.  
  310. ******* the following functions require ws_Version >= 2
  311.  
  312.     ULONG    resload_DiskLoadDev
  313.         ; IN :    d0 = ULONG  offset
  314.         ;    d1 = ULONG  size
  315.         ;    a0 = APTR   destination
  316.         ;    a1 = STRUCT taglist
  317.         ; OUT :    d0 = BOOL   success
  318.         ;    d1 = ULONG  trackdisk errorcode
  319.  
  320. ******* the following functions require ws_Version >= 3
  321.  
  322.     ULONG    resload_CRC16
  323.         ; calculate 16 bit CRC checksum
  324.         ; IN :    d0 = ULONG  size
  325.         ;    a0 = APTR   address
  326.         ; OUT :    d0 = UWORD  CRC checksum
  327.  
  328. ******* the following functions require ws_Version >= 5
  329.  
  330.     ULONG    resload_Control
  331.         ; IN :    a0 = STRUCT taglist
  332.         ; OUT :    d0 = BOOL   success
  333.     ULONG    resload_SaveFileOffset
  334.         ; write memory to file at offset
  335.         ; IN :    d0 = ULONG  size
  336.         ;    d1 = ULONG  offset
  337.         ;    a0 = CPTR   filename
  338.         ;    a1 = APTR   address
  339.         ; OUT :    d0 = BOOL   success
  340.         ;    d1 = ULONG  dos errcode
  341.  
  342. ******* the following functions require ws_Version >= 6
  343.  
  344.     ULONG    resload_ProtectRead
  345.         ; mark memory as read protected
  346.         ; IN :    d0 = ULONG  length
  347.         ;    a0 = CPTR   address
  348.         ; OUT :    -
  349.     ULONG    resload_ProtectReadWrite
  350.         ; mark memory as read and write protected
  351.         ; IN :    d0 = ULONG  length
  352.         ;    a0 = CPTR   address
  353.         ; OUT :    -
  354.     ULONG    resload_ProtectWrite
  355.         ; mark memory as write protected
  356.         ; IN :    d0 = ULONG  length
  357.         ;    a0 = CPTR   address
  358.         ; OUT :    -
  359.     ULONG    resload_ProtectRemove
  360.         ; remove memory protection
  361.         ; IN :    d0 = ULONG  length
  362.         ;    a0 = CPTR   address
  363.         ; OUT :    -
  364.     ULONG    resload_LoadFileOffset
  365.         ; load part of file to memory
  366.         ; IN :    d0 = ULONG  offset
  367.         ;    d1 = ULONG  size
  368.         ;    a0 = CPTR   name of file
  369.         ;    a1 = APTR   destination
  370.         ; OUT :    d0 = BOOL   success
  371.         ;    d1 = ULONG  dos errorcode
  372.  
  373. ******* the following functions require ws_Version >= 8
  374.  
  375.     ULONG    resload_Relocate
  376.         ; relocate AmigaDOS executable
  377.         ; IN :    a0 = APTR   address (source=destination)
  378.         ;    a1 = STRUCT taglist
  379.         ; OUT :    d0 = ULONG  size
  380.     ULONG    resload_Delay
  381.         ; wait some time
  382.         ; IN :    d0 = ULONG  time to wait in 1/10 seconds
  383.         ; OUT :    -
  384.     ULONG    resload_DeleteFile
  385.         ; delete file
  386.         ; IN :    a0 = CPTR   filename
  387.         ; OUT :    d0 = BOOL   success
  388.         ;    d1 = ULONG  dos errorcode
  389.  
  390. ******* the following functions require ws_Version >= 10
  391.  
  392.     ULONG    resload_ProtectSMC
  393.         ; detect self modifying code
  394.         ; IN :    d0 = ULONG  length
  395.         ;    a0 = CPTR   address
  396.         ; OUT :    -
  397.     ULONG    resload_SetCPU
  398.         ; control CPU setup
  399.         ; IN :    d0 = ULONG  properties
  400.         ;    d1 = ULONG  mask
  401.         ; OUT :    d0 = ULONG  old properties
  402.     ULONG    resload_Patch
  403.         ; apply patchlist
  404.         ; IN :    a0 = APTR   patchlist
  405.         ;    a1 = APTR   destination address
  406.         ; OUT :    -
  407.  
  408. ******* the following functions require ws_Version >= 11
  409.  
  410.     ULONG    resload_LoadKick
  411.         ; load kickstart image
  412.         ; IN :    d0 = ULONG  length of image
  413.         ;    d1 = UWORD  crc16 of image
  414.         ;    a0 = CPTR   basename of image
  415.         ; OUT :    -
  416.     ULONG    resload_Delta
  417.         ; apply wdelta
  418.         ; IN :    a0 = APTR   src data
  419.         ;    a1 = APTR   dest data
  420.         ;    a2 = APTR   wdelta data
  421.         ; OUT :    -
  422.     ULONG    resload_GetFileSizeDec
  423.         ; get size of a packed file
  424.         ; IN :    a0 = CPTR   filename
  425.         ; OUT :    d0 = ULONG  size of file
  426.  
  427.     LABEL    resload_SIZEOF
  428.  
  429. ******* compatibility for older slave sources:
  430.  
  431. resload_CheckFileExist = resload_GetFileSize
  432.  
  433. ;=============================================================================
  434. ; commands used in patchlist
  435. ; each command follows the address to modify, if bit 16 of the command is
  436. ; cleared address follows as 32 bit, if bit 16 of the command is set it
  437. ; follows as 16 bit (unsigned extended to 32 bit)
  438.  
  439.     ENUM    0
  440.     EITEM    PLCMD_END        ;end of list
  441.     EITEM    PLCMD_R            ;set "rts"
  442.     EITEM    PLCMD_P            ;set "jmp"
  443.     EITEM    PLCMD_PS        ;set "jsr"
  444.     EITEM    PLCMD_S            ;set "bra.w" (skip)
  445.     EITEM    PLCMD_I            ;set "illegal"
  446.     EITEM    PLCMD_B            ;write byte to specified address
  447.     EITEM    PLCMD_W            ;write word to specified address
  448.     EITEM    PLCMD_L            ;write long to specified address
  449. ; version 11
  450.     EITEM    PLCMD_A            ;write address which is calculated as
  451.                     ;base + arg to specified address
  452.  
  453. ;=============================================================================
  454. ; macros to build patchlist
  455.  
  456. PL_START    MACRO            ;start of patchlist
  457. .patchlist
  458.         ENDM
  459.  
  460. PL_END        MACRO            ;end of patchlist
  461.     dc.w    PLCMD_END
  462.         ENDM
  463.  
  464. PL_CMDADR    MACRO            ;set cmd and address
  465.     IFLT $ffff-\2
  466.     dc.w    \1
  467.     dc.l    \2
  468.     ELSE
  469.     dc.w    $8000+\1
  470.     dc.w    \2
  471.     ENDC
  472.     ENDM
  473.  
  474. PL_R        MACRO            ;set "rts"
  475.     PL_CMDADR PLCMD_R,\1
  476.         ENDM
  477.  
  478. PL_PS        MACRO            ;set "jmp"
  479.     PL_CMDADR PLCMD_PS,\1
  480.     dc.w    \2-.patchlist        ;destination (inside slave!)
  481.         ENDM
  482.  
  483. PL_P        MACRO            ;set "jsr"
  484.     PL_CMDADR PLCMD_P,\1
  485.     dc.w    \2-.patchlist        ;destination (inside slave!)
  486.         ENDM
  487.  
  488. PL_S        MACRO            ;skip bytes, set "bra"
  489.     PL_CMDADR PLCMD_S,\1
  490.     dc.w    \2-2            ;distance
  491.         ENDM
  492.  
  493. PL_I        MACRO            ;set "illegal"
  494.     PL_CMDADR PLCMD_I,\1
  495.         ENDM
  496.  
  497. PL_B        MACRO            ;write byte
  498.     PL_CMDADR PLCMD_B,\1
  499.     dc.w    \2            ;data to write
  500.         ENDM
  501.  
  502. PL_W        MACRO            ;write word
  503.     PL_CMDADR PLCMD_W,\1
  504.     dc.w    \2            ;data to write
  505.         ENDM
  506.  
  507. PL_L        MACRO            ;write long
  508.     PL_CMDADR PLCMD_L,\1
  509.     dc.l    \2            ;data to write
  510.         ENDM
  511.  
  512. ; version 11
  513.  
  514. PL_A        MACRO            ;write address (base+arg)
  515.     PL_CMDADR PLCMD_A,\1
  516.     dc.l    \2            ;data to write
  517.         ENDM
  518.  
  519. ;=============================================================================
  520.  
  521.  ENDC
  522.