home *** CD-ROM | disk | FTP | other *** search
/ Die ASC Mega 2 / ASC-Mega2-CD-ROM.iso / SPIELE / KAISER / SETATTR.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-08-13  |  805 b   |  58 lines

  1. ; SETATTR.ASM
  2. ;
  3. ; procedure setattr(y,x,anzahl,att: byte);
  4.  
  5. public        setattr
  6.  
  7. data        segment word public
  8.         assume ds:data
  9.  
  10.         extrn    crt_screen: dword
  11.  
  12. data        ends
  13.  
  14.  
  15. code        segment word public
  16.         assume cs:code
  17.  
  18. setattr        proc far
  19.  
  20. lng        equ 6    ; BP + Rücksprung-AD
  21. att        equ byte ptr ss:[bp+lng]
  22. anzahl        equ byte ptr ss:[bp+lng+2]
  23. x        equ byte ptr ss:[bp+lng+4]
  24. y        equ byte ptr ss:[bp+lng+6]
  25. param_bytes    equ 8
  26.  
  27.     push    bp
  28.     mov    bp,sp
  29.     push    ds
  30.     cld
  31.  
  32.     les    di,crt_screen
  33.         assume    es:nothing
  34.     mov     al,x
  35.     xor    ah,ah
  36.         shl     ax,1
  37.     add    di,ax
  38.     mov    al,y
  39.     mov    bx,160
  40.     mul    bx
  41.     add    di,ax        ; ES:DI zeigt auf Bildschirm
  42.  
  43.     mov    cl,anzahl
  44.     xor    ch,ch
  45.     mov    al,att
  46. schleife:
  47.     inc    di
  48.     stosb
  49.     loop    schleife
  50.  
  51.     pop    ds
  52.     pop    bp
  53.     ret    param_bytes
  54.  
  55. setattr        endp
  56.  
  57. code        ends
  58.         end