]> wirehaze git hosting - lifeboot.git/blobdiff - lifeboot.asm

wirehaze git hosting

fix flickering
[lifeboot.git] / lifeboot.asm
index ed033500fa6fd5b529a420c2dd764442c6607d13..655febbd6ab1d07658e013e5705f4455a728dd6f 100644 (file)
@@ -52,8 +52,15 @@ mov ah, 0x01                ; set text-mode cursor shape
 int 0x10                    ; video services
 
 ; initialize xss
 int 0x10                    ; video services
 
 ; initialize xss
+
+set_xss_seed:
+
 mov ah, 0x00                ; get
 int 0x1a                    ;  system time
 mov ah, 0x00                ; get
 int 0x1a                    ;  system time
+
+cmp dx, 0
+je set_xss_seed             ; if seed is 0, xs wont work properly
+
 mov [xss], dx               ; cx:dx = number of clock ticks since midnight
 
 ; initialize currvgapg
 mov [xss], dx               ; cx:dx = number of clock ticks since midnight
 
 ; initialize currvgapg
@@ -69,6 +76,7 @@ call init_grid
 
 next_state:
 
 
 next_state:
 
+call vsync_wait
 call write_next_vga_page
 call wait_keypress
 call flip_vga_page
 call write_next_vga_page
 call wait_keypress
 call flip_vga_page
@@ -187,18 +195,6 @@ call vsync_wait
 xor word [currvgapg], VGAPGSZ   ; flip currvgapg
 setnz al                        ; al = !(currvgapg == 0)
 
 xor word [currvgapg], VGAPGSZ   ; flip currvgapg
 setnz al                        ; al = !(currvgapg == 0)
 
-mov di, [currvgapg]             ; es:di -> current page
-mov dh, PRINT_COLOR
-
-mov dl, 'P'
-mov [es:di], dx
-
-mov dl, al
-add dl, 48
-add di, 2
-
-mov [es:di], dx
-
 mov ah, 0x05                ; select active display page
 int 0x10                    ; video services
 
 mov ah, 0x05                ; select active display page
 int 0x10                    ; video services