home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / assembly / getmap.lha / .source / getmap.s
Encoding:
Text File  |  1980-02-07  |  569 b   |  22 lines

  1.         move.l    4.w,a6            ; get execbase
  2.         move.l    322(a6),a0        ; get memlist ptr
  3.  
  4. find_adr:    tst.l    (a0)            ; no memory at this ptr??
  5.         beq.s    adr_zero        ; exit..
  6.         move.w    14(a0),d0        ; extract memory ptr
  7.         andi.w    #2,d0            ; is it chip ?
  8.         bne.s    nom8
  9.         move.l    (a0),a0            ; grab pointer
  10.         bra.s    find_adr        ; get next adr
  11.  
  12.  
  13. noM8:        move.l    20(a0),d0        ; get start of memory region
  14.         move.l    24(a0),d1        ; get end of memory region
  15.         add.l    #$FFFF,d1        ;
  16.         clr.w    d0            ;
  17.         move.w    d0,d1            ;
  18.         sub.l    d0,d1            ; mask off crap..
  19. adr_zero                    ; d0=start of chip region
  20.                         ; d1=end of chip region
  21.         rts
  22.