out of space
[bootcard] / bootcard.asm
index 80779b3..63a6ada 100644 (file)
@@ -50,7 +50,7 @@ KB_CTRL               equ 61h
        out PIT_DATA0 + %1, al
 %endmacro
 
-start: xor eax, eax
+start: xor ax, ax
        mov ds, ax
        mov es, ax
        mov ss, ax
@@ -111,11 +111,36 @@ drawbg:
 .fillgrad:
        mov ax, bx
        mov ah, al
-       mov cx, 3680    ; 20 lines
+       mov cx, 2400    ; 15 lines
        rep stosw
        inc bx
        cmp bx, 208
        jnz .fillgrad
+
+       ; mountains
+       mov cx, 320
+       mov bp, sp
+.mnt:  mov [bp - 2], cx
+       fild word [bp - 2]
+       fidiv word [w30]
+       fsincos
+       fiadd word [w5]
+       fimul word [w5]
+       fistp word [bp - 2]
+       ;fistp word [bp - 4]
+       mov bx, [bp - 2]
+       add bx, 100
+       imul bx, bx, 320
+       add bx, cx
+.mntcol:
+       mov byte [es:bx], 0
+       add bx, 320
+       cmp bx, 64000
+       jb .mntcol
+
+       dec cx
+       jnz .mnt
+       
        ret
 
 
@@ -145,7 +170,7 @@ timer_intr:
        cmp ax, cx
        jb .eoi
 
-       inc dword [muscur]
+       inc word [muscur]
        mov ax, [music + 2 + bx] ; event counter reload
        test ax, ax
        jz .off
@@ -169,7 +194,7 @@ timer_intr:
        
 
 str1:  db 'message message blah',0
-str2:  db 'Michael & Athina',0
+str2:  db 'Michael & Athena',0
 
 G2     equ 24351/2
 C3     equ 18243/2
@@ -218,6 +243,9 @@ music:      dw 0, 0
        dd 0820280ch
        dd 00000800h
        dd 0001f800h
+
+w5:    dw 5
+w30:   dw 30
        times 510-($-$$) db 0
        dw 0aa55h