]> 4ch.mooo.com Git - 16.git/blob - 16/xw_/mxhl.asm
16_ca needs huge amounts of work and I should remember what needs to be done soon...
[16.git] / 16 / xw_ / mxhl.asm
1                 PUBLIC  SUBHORIZONTALLINEINFO
2                 EXTRN   MX_BYTESPERLINE:BYTE
3 MX_TEXT         SEGMENT PARA PUBLIC USE16 'CODE'
4                 ASSUME CS:MX_TEXT, DS:DGROUP, SS:DGROUP
5 L$1:
6         add             byte ptr [bx+si],al
7         add             ax,word ptr [bx+si]
8         add             al,byte ptr [bx+si]
9         add             word ptr [bx+si],ax
10 L$2:
11         add             byte ptr ds:[80cH],cl
12 L$3:
13         add             byte ptr [bx+di],al
14         add             ax,word ptr [bx]
15 L$4:
16     DB  2, 6
17 SUBHORIZONTALLINEINFO:
18     ;DD ds:[63278]
19     ASSUME  ds:NOTHING
20         add             byte ptr -2e05H[bp+di],cl
21         out             dx,ax
22         shr             di,1
23         add             di,ax
24         and             bx,3
25         mov             al,byte ptr cs:L$2[bx]
26         shl             bx,1
27         sub             cx,word ptr cs:L$1[bx]
28         jge             L$5
29         mov             bx,cx
30         inc             bx
31         inc             bx
32         and             al,byte ptr cs:L$4[bx]
33         xor             ah,ah
34         xor             cx,cx
35         jmp             L$6
36 L$5:
37         mov             bx,cx
38         and             bx,3
39         mov             ah,byte ptr cs:L$3[bx]
40         shr             cx,1
41         shr             cx,1
42 L$6:
43         ret
44 MX_TEXT         ENDS
45                 END