home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / MRFiles / PHOTO.SFX / album (.txt) next >
Encoding:
GEOS ConVerT  |  1990-02-12  |  3.3 KB  |  137 lines

  1. Album
  2. PRG formatted GEOS file V1.0
  3. CONVERTED WITH GEOSHELL V2.2
  4. Write Image V2.1
  5. geoWrite    V2.1
  6. ;*************************************
  7. ;    Album
  8. ;    this is developed for use with
  9. ;    GeoBasic. This routine may be
  10. ;    loaded into memory at 30976 and
  11. ;    then CALL 30978,a,x,y to display
  12. ;    a photo scrap from an album.
  13. ;    x and y should be loaded
  14. ;    with the upper left corner location
  15. ;    where the bitmap should be displayed.
  16. ;    And .a should be loaded with the
  17. ;    photo number in the album.
  18. ;    The track and sector of the index
  19. ;    block for the photo album should be
  20. ;    poked to 30976 and 30977 prior to
  21. ;    calling the routine.
  22. ;*************************************
  23. .if    Pass1
  24. .noeqin
  25. .noglbl
  26. .include    geosSym
  27. .include    geosMac
  28. .glbl
  29. .eqin
  30. .endif
  31.     .psect
  32. indexTrack:
  33.     .block    1
  34. indexSector:
  35.     .block    1
  36. indexTrack:
  37.     .block    1
  38. indexSector:
  39.     .block    1
  40. ;routine to display a PhotoScrap from an album using BitOtherClip.
  41. Album:
  42.     asl    a
  43.     MoveB    
  44. indexTrack
  45.     MoveB    
  46. indexSector
  47.     LoadW    r4,#indexBuffer
  48.     jsr    GetBlock
  49.     PopB    r1H
  50.     PopB    r1L
  51.     lda    indexBuffer+2,y
  52.     beq    10$
  53.     lda    indexBuffer,y
  54.     bne    15$
  55.     sta    saveR1L
  56.     lda    indexBuffer+1,y
  57.     sta    saveR1H
  58.     LoadB    saveR5+0,#0
  59.     sta    saveR5+1
  60.     jsr    GetNxtBitmapByte
  61.     sta    bitmapWidth
  62.     jsr    GetNxtBitmapByte
  63.     sta    bitmapHeight+0
  64.     jsr    GetNxtBitmapByte
  65.     sta    bitmapHeight+1
  66.     lda    #40
  67.     sbc    r1L
  68.     sta    r2L
  69.     cmp    bitmapWidth
  70.     bcc    65$
  71.     MoveB    bitmapWidth,r2L
  72.     LoadB    r11H,#0
  73.     beq    68$    ;branch always.
  74.     lda    bitmapWidth
  75.     sbc    r2L
  76.     sta    r11H
  77.     lda    bitmapHeight+1
  78.     bne    70$
  79.     lda    #200
  80.     sbc    r1H
  81.     cmp    bitmapHeight+0
  82.     bcc    70$
  83.     lda    bitmapHeight+0
  84.     sta    r2H
  85.     jsr    ReloadR0
  86.     LoadB    r11L,#0
  87.     lda    bitmapHeight+0
  88.     sta    r2H
  89.     jsr    ReloadR0
  90.     LoadB    r11L,#0
  91.     sta    r12L
  92.     sta    r12H
  93.     LoadW    r13,#GetBitmapByte
  94.     LoadW    r14,#ReloadR0
  95.     jsr    BitOtherClip
  96.     ldx    #0
  97. ReloadR0:
  98.     LoadW    r0,#bitmapBuffer
  99. GetBitmapByte:
  100.     jsr    GetNxtBitmapByte
  101.     ldy    #0
  102.     sta    (r0),y
  103. GetNxtBitmapByte:
  104.     PushW    r1
  105.     PushW    r4
  106.     PushW    r5
  107.     MoveB    saveR1L,r1L
  108.     MoveB    saveR1H,r1H
  109.     LoadW    r4,#diskBlkBuf
  110.     MoveW    saveR5,r5
  111.     jsr    ReadByte
  112.     sta    bitmapByte
  113.     MoveB    r1L,saveR1L
  114.     MoveB    r1H,saveR1H
  115.     MoveW    r5,saveR5
  116.     PopW    r5
  117.     PopW    r4
  118.     PopW    r1
  119.     lda    bitmapByte
  120.     .ramsect
  121. saveR1L:
  122.     .block    1
  123. saveR1H:
  124.     .block    1
  125. saveR5:
  126.     .block    2
  127. bitmapWidth:
  128.     .block    1
  129. bitmapHeight:
  130.     .block    2
  131. bitmapByte:
  132.     .block    1
  133. bitmapBuffer:
  134.     .block    134
  135. indexBuffer:
  136.     .block    256
  137.