home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / develop / here / simbug / docs / sim.base < prev    next >
Text File  |  1995-02-27  |  6KB  |  169 lines

  1. -------------------------------------------------------------------------------
  2.  S.I.M. Base Structure
  3. -------------------------------------------------------------------------------
  4.  
  5.  
  6. ;--- Base ---------
  7.  
  8.  STRUCT toolbase       ;+0  The start address of SIM in memory
  9.  
  10.  
  11. ;--- Display ------
  12.  
  13.  APTR  plane           ;+0  The start address of the $5000 bytes display ram
  14.                             (must be graphic memory!)
  15.  
  16.  APTR  backup          ;+4  The start address of the backup of the display.
  17.                             When not zero, SIM will copy what is in the
  18.                             memory of the future display to this address
  19.                             when entered and copy it back when left.
  20.  
  21.  
  22. ;--- Entrances ----
  23.  
  24.  JMP   entrance1       ;+8  Entrance for JSR. Here you can simply enter SIM
  25.                             by a 'JSR' to this address.
  26.  
  27.  JMP   entrance2       ;+12 Entrance for Exec's traphandle. When you want to
  28.                             use SIM as traphandler of your task, write this
  29.                             address to <taskstruct+50>.
  30.  
  31.  JMP   entrance3       ;+16 Debug server entrance.
  32.  
  33.  LONG  0               ;+20 *** RESERVED FOR EXPANSION ***
  34.  
  35.  
  36. ;--- Traps --------    ;When a trap is set directly, its vector is set to
  37.                        ;the corresponding entrance in here.
  38.  
  39.  JMP   entrance22      ;+24 Bus error
  40.  JMP   entrance23      ;+28 Address error
  41.  JMP   entrance24      ;+32 Illegal instruction
  42.  JMP   entrance25      ;+36 Divide-by-zero
  43.  JMP   entrance26      ;+40 CHK instruction
  44.  JMP   entrance27      ;+44 TRAPV instruction
  45.  JMP   entrance28      ;+48 Privilege violation
  46.  JMP   entrance29      ;+52 Trace
  47.  JMP   entrance2a      ;+56 Op Code 1010
  48.  JMP   entrance2b      ;+60 Op Code 1111
  49.  
  50.  
  51. ;--- Signal -------
  52.  
  53.  LONG  "SIM!"          ;+64 This Long signals that this is SIM
  54.  LONG  version         ;+68 Version of SIM as 4 ASCII chars
  55.  
  56.  
  57. ;--- Backups ------    ;When SIM is entered it backups some customregisters
  58.                        ;and vectors here.
  59.  
  60.  WORD  dmacon          ;+72 $DFF096/002
  61.  WORD  intena          ;+74 $DFF09A/01C
  62.  WORD  intreq          ;+76 $DFF09C/01E
  63.  LONG  level2          ;+78 VBR+$68
  64.  LONG  level3          ;+82 VBR+$6C
  65.  
  66.  BYTE  ciaacra         ;+86 $BFEE01
  67.  BYTE  ciaacrb         ;+87 $BFEF01
  68.  BYTE  ciabcra         ;+88 $BFDE00
  69.  BYTE  ciabcrb         ;+89 $BFDF00
  70.  BYTE  ciaapra         ;+90 $BFE001
  71.  BYTE  ciaaprb         ;+91 $BFE101
  72.  BYTE  ciaaddra        ;+92 $BFE201
  73.  BYTE  ciaaddrb        ;+93 $BFE301
  74.  BYTE  ciabddra        ;+94 $BFD200
  75.  BYTE  ciaasp          ;+95 $BFEC01
  76.  LONG  vpos            ;+96 $DFF004
  77.  
  78.  
  79. ;--- Reentry ------    ;Reentry values of things that can't be saved.
  80.                        ;When SIM is left, it inits the registers named
  81.                        ;with the values in this list.
  82.  
  83.  WORD  $2981           ;+100 DIWSTRT
  84.  WORD  $29c1           ;+102 DIWSTOP
  85.  WORD  $0038           ;+104 DDFSTRT
  86.  WORD  $00d0           ;+106 DDFSTOP
  87.  WORD  $5200           ;+108 BPLCON0
  88.  WORD  $0000           ;+110 BPLCON1
  89.  WORD  $0000           ;+112 BPLMOD1
  90.  WORD  $0000           ;+114 COLOR00
  91.  WORD  $0000           ;+116 COLOR01
  92.  
  93.  
  94. ;--- ICR Special --    ;The ICR data and mask.
  95.  
  96.  BYTE  lasticr         ;+118 $BFED00 read
  97.  BYTE  reentryicrmask  ;+119 $BFED00 write
  98.  
  99.  
  100. ;--- Distances ----    ;Distances to internal structures.
  101.  
  102.  LONG  disasscalc-base ;+120 Distance to disasscalc module
  103.  LONG  preferences-base;+124 Distance to preferences structure
  104.  
  105.  
  106. ;--- Debug --------    ;Debug server structure for entrance 3.
  107.  
  108.  LONG  0               ;+128 Offset from here to end of inited part
  109.  LONG  "????"          ;+132 Sign of server
  110.  
  111.  
  112. ;--- Program ------    ;The registers of the program that is debugged.
  113.  
  114.  LONG  0               ;+136 Register d0
  115.  LONG  0               ;+140 Register d1
  116.  LONG  0               ;+144 Register d2
  117.  LONG  0               ;+148 Register d3
  118.  LONG  0               ;+152 Register d4
  119.  LONG  0               ;+156 Register d5
  120.  LONG  0               ;+160 Register d6
  121.  LONG  0               ;+164 Register d7
  122.  LONG  0               ;+168 Register a0
  123.  LONG  0               ;+172 Register a1
  124.  LONG  0               ;+176 Register a2
  125.  LONG  0               ;+180 Register a3
  126.  LONG  0               ;+184 Register a4
  127.  LONG  0               ;+188 Register a5
  128.  LONG  0               ;+192 Register a6
  129.  LONG  0               ;+196 User stack pointer
  130.  LONG  0               ;+200 Supervisor stack pointer/ISP
  131.  LONG  0               ;+204 PC of program
  132.  WORD  0               ;+208 SR of program
  133.  
  134.  
  135. ;--- Server data --
  136.  
  137.  LONG  0               ;+210 Reentry routine of server
  138.  LONG  0               ;+214 Reentry usp of server
  139.  LONG  0               ;+218 Reentry ssp of server/ISP
  140.  LONG  0               ;+222 Reentry sr of server
  141.  
  142.  
  143. ;--- Extension ----
  144.  
  145.  APTR  0               ;+224 Pointer to zero ended list of APTRs that point
  146.                              to zero ended texts. The texts in this list are
  147.                              printed and the pointer is cleared
  148.  APTR  0               ;+228 Pointer to task structure
  149.  APTR  0               ;+232 Segmentlist
  150.  APTR  0               ;+236 Symbollist with labels
  151.  
  152.  LONG  0               ;+240 MSP (68020+ only)
  153.  LONG  0               ;+244 Reentry MSP (68020+ only)
  154.  
  155.  LONG  0,0             ; RESERVED
  156.  
  157.  LONG  sim_size        ;+256 Size of SIM
  158.  BYTE  0               ;+260 CPU information
  159.  BYTE  0               ;+261 MMU information
  160.  WORD  0               ;+262 BEAMCON0 reentry value
  161.  LONG  0               ;+264 VBR
  162.  
  163.  
  164. ;--- End ----------    ;+268 This is the end of the actual structure
  165.  
  166.  
  167. --------------------------------------------------------------------------------
  168.  
  169.