-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCpicProc.asm
101 lines (101 loc) · 2.15 KB
/
CpicProc.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
proc oring
;enter - si = picture to print. heigh, widt = dimensions. pos = position
;exit - prints the bitmap.
dopush ax,cx,es
mov ax,0A000h
mov es,ax
mov di,[pos]
mov cx,[height]
orl:
push cx
mov cx,[widthh]
yy:
lodsb
or [es:di],al
inc di
loop yy
add di,320
sub di,[widthh]
pop cx
loop orl
dopop es,cx,ax
ret
endp oring
;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
proc anding
;enter - pos = position. height,width = dimensions. si = mask.
;exit - deletes background acording to mask.
dopush ax,cx,es
mov ax,0A000h
mov es,ax
mov di,[pos]
mov cx,[height]
and1:
push cx
mov cx,[widthh]
xx:
lodsb
and [es:di], al
inc di
loop xx
add di,320
sub di,[widthh]
pop cx
loop and1
dopop es,cx,ax
ret
endp anding
;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
proc takeB
;enter - pos = position. si = location in memory to save in. height,width = dimensions.
;exit - saves background in memory from position pos.
dopush ax,cx,si
mov ax,0A000h
mov es,ax
mov di,[Pos]
mov cx,[height] ;height
xx1:
push cx
mov cx,[widthh] ;width
yy1:
mov al,[es:di]
mov [si],al
doInc di,si
loop yy1
add di, 320
sub di, [widthh] ;width
pop cx
loop xx1
dopop si,cx,ax
ret
endp takeB
;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
proc retB
;enter - si = background to return. pos = position. height,width = dimensions.
;exit - prints saved background in position.
dopush ax,cx,si
mov ax,0A000h
mov es,ax
mov di, [Pos]
mov cx,[height] ;height
ret1:
push cx
mov cx, [widthh] ;width
ret2:
mov al,[si]
mov[es:di],al
cont5:
doInc di,si
loop ret2
add di,320
sub di, [widthh] ;width
pop cx
loop ret1
dopop si,cx,ax
ret
endp retB
;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''