diff --git a/.program2.asm.swp b/.program2.asm.swp new file mode 100644 index 0000000..84b2d0b Binary files /dev/null and b/.program2.asm.swp differ diff --git a/boot.asm b/boot.asm index 445415a..4335b0c 100755 --- a/boot.asm +++ b/boot.asm @@ -63,7 +63,6 @@ welcome: start: mov ah, 0x00 int 0x16 - cmp al, "0" jmp load_it_all_1 load_it_all_1: diff --git a/boot.bin b/boot.bin index 781a960..0e9d01b 100644 Binary files a/boot.bin and b/boot.bin differ diff --git a/disk.img b/disk.img index 0995b63..0fb2cc8 100755 Binary files a/disk.img and b/disk.img differ diff --git a/program.asm b/program.asm index d5ecb69..63b5f49 100755 --- a/program.asm +++ b/program.asm @@ -66,18 +66,79 @@ print_projects: lea di, [projects] ; RDI now has the address of the array .loop + mov [storebx], bx mov ah, 02h ;mov bh, 0h add dh, 1h ;move cursor down + mov dl, 4h; + int 10h + + mov ax, [currentselection] + cmp ax, bx + jne .normalbackground + mov ah, 06h ;draw rect on background + mov ch, dh + mov cl, 4h + mov dl, 24h + mov bh, 7Ch + int 10h + jmp .drawstring + +.normalbackground + mov ah, 06h ;draw rect on background + mov ch, dh + mov cl, 4h + mov dl, 24h + mov bh, 1Eh int 10h + jmp .drawstring +.drawstring + mov bx, [storebx] mov si, [di+bx] ; Get the address of string1 call print add bx, 8 cmp bx, 48 jne .loop - jmp exit + jmp waitforkey + + +waitforkey: + mov ah, 0x00 + int 0x16 + cmp ah, 1Fh + je .up + cmp ah, 11h + je .down + jmp waitforkey + +.up + mov ax, [currentselection] + cmp ax, 40 + je .reup + add ax, 8 + mov [currentselection], ax + jmp print_projects + +.reup + mov ax, 0 + mov [currentselection], ax + jmp print_projects + + +.down + mov ax, [currentselection] + cmp ax, 0 + je .redown + sub ax, 8 + mov [currentselection], ax + jmp print_projects + +.redown + mov ax, 40 + mov [currentselection], ax + jmp print_projects print: @@ -103,3 +164,6 @@ project5 db "Angeliki / Voices", 0x0A,0 project6 db "Zalan / Phantasmagoria", 0x0A,0 projects dq project1, project2, project3, project4, project5, project6 + +currentselection dw 0 +storebx dw 0 diff --git a/program.bin b/program.bin index f480c58..fc414f4 100644 Binary files a/program.bin and b/program.bin differ