home *** CD-ROM | disk | FTP | other *** search
- ; BOX.ASM
- ;
- ; procedure box(muster,x_start,y_start,x_lng,y_lng,rand_att,mitt_att: byte);
-
- data segment word public
- assume ds:data
-
- extrn crt_screen: dword
- extrn box_muster: unknown
- lo db (?)
- ho db (?)
- ro db (?)
- ve db (?)
- lu db (?)
- ru db (?)
-
- data ends
-
-
- code segment word public
- assume cs:code
-
- box proc far
- public box
-
- lng equ 6 ; BP + Rücksprung-AD
- mitt_att equ byte ptr ss:[bp+lng]
- rand_att equ byte ptr ss:[bp+lng+2]
- y_lng equ byte ptr ss:[bp+lng+4]
- x_lng equ byte ptr ss:[bp+lng+6]
- y_start equ byte ptr ss:[bp+lng+8]
- x_start equ byte ptr ss:[bp+lng+10]
- muster equ byte ptr ss:[bp+lng+12]
- param_bytes equ 14
-
- push bp
- mov bp,sp
-
- cld
- push ds
- pop es
- mov si,offset(box_muster)
- mov di,offset(lo)
- mov al,muster
- xor ah,ah
- mov bx,6
- mul bx
- add si,ax
- mov cx,3
- rep movsw
-
- les di,crt_screen
- assume es:nothing
- mov al,x_start
- xor ah,ah
- shl ax,1
- add di,ax
- mov al,y_start
- mov bx,160
- mul bx
- add di,ax ; ES:DI zeigt auf linke untere Ecke der Box
- mov si,di ; SI = linker Rand
- mov bl,x_lng
- xor bh,bh ; BX = x_lng
- mov dh,rand_att ; DH = rand_att
- mov ah,dh
-
- mov al,lo
- stosw ; linke obere Ecke zeichen
- mov al,ho
- mov cx,bx
- rep stosw ; oberen waagerechten Balken zeichnen
- mov al,ro
- stosw ; rechte obere Ecke zeichnen
-
- mov dl,y_lng
- y_loop:
- add si,160
- mov di,si
- mov ah,dh
- mov al,ve
- stosw ; linken Rand zeichnen
- mov al,' '
- mov ah,mitt_att
- mov cx,bx
- rep stosw ; Mitte ausfüllen
- mov al,ve
- mov ah,dh
- stosw ; rechten Rand zeichnen
- dec dl
- jnz y_loop
- add si,160
- mov di,si
-
- mov al,lu
- stosw ; linke untere Ecke zeichen
- mov al,ho
- mov cx,bx
- rep stosw ; unteren waagerechten Balken zeichnen
- mov al,ru
- stosw ; rechte untere Ecke zeichnen
-
- pop bp
- ret param_bytes
-
- box endp
-
- code ends
- end