]> 4ch.mooo.com Git - plz.git/blobdiff - plzpart/asmyt.c
cd ..cd ..
[plz.git] / plzpart / asmyt.c
index 041eb79b46fd370301044c3940c95a8965c526be..d8447479a20927cf9c9ae4603dbfb9997d9c9827 100755 (executable)
@@ -28,7 +28,7 @@ int plzline(int y, int vseg)
        };
        uint8_t ah = 0;
        uint8_t al = 0;
-       uint32_t eax = 0;
+       uint16_t eax = 0;
        int i;
 
        for (i = 0; i < 84; i++) {
@@ -68,12 +68,15 @@ int plzline(int y, int vseg)
 
                if ((ccc & 3) == 2) {
                        eax = (ah << 8) | al;
-                       eax <<= 16;
+                       eax <<= 8;
                }
 
                if ((ccc & 3) == 0) {
                        eax |= (ah << 8) | al;
-                       vga_write32(nVgaYOffset + ccc, eax);
+//                     vga_write32(nVgaYOffset + ccc, eax);
+                       __asm {
+                               mov     [es:ccc], ax
+                       }
                }
        }
 
@@ -103,9 +106,22 @@ int setplzparas(int c1, int c2, int c3, int c4)
        return 0;
 }
 
-int set_plzstart(int y)
+word set_plzstart(word start)
 {
-       vga_set_line_compare(y);
-
-       return 0;
+__asm{
+       mov     dx, 3d4h
+       mov     al, 18h         ; linecompare
+       mov     ah, [Byte PTR start]
+       out     dx, ax
+       mov     al, 07h
+       mov     ah, [Byte PTR start+1]
+       shl     ah, 1d
+       shl     ah, 1d
+       shl     ah, 1d
+       shl     ah, 1d
+       and     ah, 10h
+       or      ah, 0fh
+       out     dx, ax                  ; 8th bit
+}
+       return start;
 }