home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 4: Demo 1 / almathera_demo1.bin / sourcecode / german / screen-test2.s < prev    next >
Text File  |  1995-03-17  |  3KB  |  139 lines

  1. ;
  2. ;        Allgemeine Variablen
  3. font = 0
  4. ;        Offsets Graphics
  5. ;
  6. InitBitMap      = -30 -360
  7. InitRastPort    = -30 -168
  8. ;
  9. ;        Offsets Exec
  10. ;
  11. OldOpenLibrary  = -30 -378
  12. CloseLibrary    = -30 -384
  13. ;
  14. ;        Offsets Intuition
  15. ;
  16. OpenScreen      = -30 -168
  17. CloseScreen     = -30 -36
  18. ;
  19. ;        Einzige absolute Adr.
  20. ExecBase = 4
  21. ;
  22. even
  23. ;
  24. start:
  25.  jsr initlibrarys
  26.  jsr setnewscreen
  27.  jsr setbitmap
  28.  jsr waitmouse
  29.  jsr restorescreen
  30.  jsr restorelibrarys
  31.  illegal
  32. setbitmap:
  33.  lea.l bitmap,a0
  34.  moveq #5,d0
  35.  move.l #320,d1
  36.  move.l #200,d2
  37.  jsr initbitmap(a6)
  38.  lea.l rastport,a1
  39.  jsr initrastport(a6)
  40.  move.l #bitmap,r_bitmap
  41.  rts
  42. ;
  43. waitmouse:
  44.  andi.b #64,$bfe001             ; Bit 7 linke Mousetaste
  45.  bne waitmouse
  46.  rts
  47. ;
  48. restorescreen:
  49.  move.l intuitionbase,a6
  50.  move.l screen,a0
  51.  jsr closescreen(a6)
  52.  rts
  53. ;
  54. setnewscreen:
  55.  move.l intuitionbase,a6
  56.  lea.l newscreen,a0
  57.  jsr openscreen(a6)
  58.  move.l d0,screen
  59.  rts
  60. ;
  61. initlibrarys:
  62.  clr.l d0
  63.  move.l execbase,a6
  64.  lea.l gfxname,a1        ; Graphics - Library
  65.  jsr oldopenlibrary(a6) 
  66.  move.l d0,gfxbase
  67.  
  68.  move.l execbase,a6
  69.  lea.l intname,a1               ; Intuition - Library
  70.  jsr oldopenlibrary(a6)
  71.  move.l d0,a6
  72.  move.l d0,intuitionbase
  73.  rts
  74. ;
  75. restorelibrarys:
  76.  move.l execbase,a6
  77.  
  78.  move.l gfxbase,a1              ; Graphic Library 
  79.  jsr closelibrary               ; schließen
  80.  
  81.  move.l intuitionbase,a1        ; Intuition Library
  82.  jsr closelibrary               ; scließen
  83. rts
  84. ;        Library - Names & Adr.
  85. ;
  86. gfxname: dc.b "graphics.library",0
  87. align 4
  88. intname: dc.b "intuition.library",0
  89. align 4
  90. gfxbase: dc.l 1,0
  91. intuitionbase: dc.l 1,0
  92. ;
  93. ;        Screen - Daten
  94. ;
  95. Newscreen:
  96.  dc.w 0,0               ; x & y position
  97.  dc.w 320               ; Breite
  98.  dc.w 200               ; Höhe
  99.  dc.w 5                 ; anzahl der Bitplanes
  100.  dc.b 0,1               ; Detail Pen, Block Pen
  101.  dc.w 0,15              ; View Modes, Screen Type
  102.  dc.l font              ; Adr des Zeichensatzes
  103.  dc.l title             ; Adr des Screentitles
  104.  dc.l 0,0               ; Adr Gag., Bitmap
  105. ;
  106. ;        Allgemaeine Daten
  107. ;
  108. title: dc.b "The C.C.G. in 1987",0
  109. align 4
  110. ;
  111. screen: dc.l 0          ; Adresse Der Screen-Datenliste
  112. ;
  113. bitmap:
  114. bytesperrow:blk.w 1,0
  115. bytes:  blk.w 1,0
  116. flags:  blk.b 1,0
  117. depth:  blk.b 1,0
  118. pad:    blk.w 1,0
  119. plane1: blk.l 1,0
  120. plane2: blk.l 1,0
  121. plane3: blk.l 1,0
  122. plane4: blk.l 1,0
  123. plane5: blk.l 1,0
  124. planes: blk.l 1,0
  125. ;
  126. rastport:
  127.           blk.l 1,0
  128. r_bitmap: blk.l 1,0
  129.           blk.b 22,0
  130.           blk.b 4,0
  131. cp_x:     blk.w 1,0
  132. cp_y:     blk.w 1,0
  133.           blk.b 60,0
  134.           blk.w 6,0
  135.           even
  136. ;
  137.