]> 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 .387
2                 PUBLIC  SUBHORIZONTALLINEINFO
3                 EXTRN   MX_BYTESPERLINE:BYTE
4 MX_TEXT         SEGMENT PARA PUBLIC USE16 'CODE'
5                 ASSUME CS:MX_TEXT, DS:DGROUP, SS:DGROUP
6 L$1:
7         add             byte ptr [bx+si],al
8         add             ax,word ptr [bx+si]
9         add             al,byte ptr [bx+si]
10         add             word ptr [bx+si],ax
11 L$2:
12         add             byte ptr ds:[80cH],cl
13 L$3:
14         add             byte ptr [bx+di],al
15         add             ax,word ptr [bx]
16 L$4:
17     DB  2, 6
18 SUBHORIZONTALLINEINFO:
19     DD  ds:[0f72eH]
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