new functions and sorted out memory addresses / sectors

master
Your Name 6 years ago
parent 84769bcb1e
commit 69d42084f2

@ -24,7 +24,7 @@ welcome:
xor al, al ; and clear entire screen xor al, al ; and clear entire screen
xor cx, cx ; Upper left corner CH=row, CL=column = 0 xor cx, cx ; Upper left corner CH=row, CL=column = 0
mov dx, 184Fh ; lower right corner DH=row, DL=column = 25 x 80 / textmode mov dx, 184Fh ; lower right corner DH=row, DL=column = 25 x 80 / textmode
mov bh, 1Eh ; YellowOnBlue mov bh, 1Fh ; YellowOnBlue
int 10h int 10h

Binary file not shown.

Binary file not shown.

@ -15,23 +15,29 @@ start:
mov bh, 1Eh ; YellowOnBlue mov bh, 1Eh ; YellowOnBlue
int 10H ; execute interrupt int 10H ; execute interrupt
mov ah, 06h ;draw rect on background mov ah, 06h; top bar, make background
mov cx, 0101h xor cx, cx
mov dx, 124Dh mov dx, 0x004F
mov bh, 3Eh mov bh, 30h
int 10h int 10h
mov ah, 06h ;draw shadow
mov cx, 1302h mov ah, 02h ;top bar setting the position and then write title $
mov dx, 134Eh mov bh, 0h
mov bh, 0Eh mov dh, 0h
int 10h mov dl, 20h
mov ah, 06h ;draw shadow
mov cx, 024Eh
mov dx, 134Eh
mov bh, 0Eh
int 10h int 10h
mov si, title
call print
mov ah, 06h ;draw rect on background
mov cx, 0201h
mov dx, 124Dh
mov bh, 3Eh
int 10h
call drawshadow
; menu bottom ; menu bottom
mov ah, 06h ;draw rect on background mov ah, 06h ;draw rect on background
@ -163,27 +169,17 @@ help:
mov bx, 1 mov bx, 1
mov [helpon], bx mov [helpon], bx
mov ah, 06h ;draw rect on background mov ah, 06h ;draw rect on background
mov cx, 0610h mov cx, 040Fh
mov dx, 103Ah mov dx, 113Eh
mov bh, 70h mov bh, 70h
int 10h int 10h
push dx
push cx
mov si, helptext mov si, helptext
call printinrect call printinrect
pop cx
pop dx
; mov ah, 06h ;draw shadow call drawshadow
; mov cx, 1111h
; mov dx, 113Bh
; mov bh, 8Ch
; int 10h
; mov ah, 06h ;draw shadow
; mov cx, 073Bh
; mov dx, 113Bh
; mov bh, 8Ch
; int 10h
jmp waitforkey jmp waitforkey
@ -206,27 +202,27 @@ loadproject:
.one .one
mov bx, 0x2000 ; BX = 0x1000. ES:BX=0x0:0x1000 mov bx, 0x2000 ; BX = 0x1000. ES:BX=0x0:0x1000
mov cl, 04 ; Sector to read = 4 mov cl, 05 ; Sector to read = 4
jmp load jmp load
.two .two
mov bx, 0x3000 ; BX = 0x1000. ES:BX=0x0:0x1000 mov bx, 0x3000 ; BX = 0x1000. ES:BX=0x0:0x1000
mov cl, 05 ; Sector to read = 4 mov cl, 06 ; Sector to read = 4
jmp load jmp load
.three .three
mov bx, 0x4000 ; BX = 0x1000. ES:BX=0x0:0x1000 mov bx, 0x4000 ; BX = 0x1000. ES:BX=0x0:0x1000
mov cl, 06 ; Sector to read = 4 mov cl, 07 ; Sector to read = 4
jmp load jmp load
.four .four
mov bx, 0x5000 ; BX = 0x1000. ES:BX=0x0:0x1000 mov bx, 0x5000 ; BX = 0x1000. ES:BX=0x0:0x1000
mov cl, 07 ; Sector to read = 4 mov cl, 08 ; Sector to read = 4
jmp load jmp load
.five .five
mov bx, 0x6000 ; BX = 0x1000. ES:BX=0x0:0x1000 mov bx, 0x6000 ; BX = 0x1000. ES:BX=0x0:0x1000
mov cl, 08 ; Sector to read = 4 mov cl, 09 ; Sector to read = 4
jmp load jmp load
.six .six
mov bx, 0x7000 ; BX = 0x1000. ES:BX=0x0:0x1000 mov bx, 0x7000 ; BX = 0x1000. ES:BX=0x0:0x1000
mov cl, 09 ; Sector to read = 4 mov cl, 10 ; Sector to read = 4
jmp load jmp load
@ -269,42 +265,93 @@ wolf_error:
xor ax,ax xor ax,ax
int 19h int 19h
;-------- ;------------;
;ch=row ;ch=row ;
;cl=column ;cl=column ;
;dh=row ;dh=row ;
;dl=column ;dl=column ;
;-------- ;------------;
drawshadow:
push cx
push dx
mov al, dl
mov ah, ch
inc ah
inc al
mov cx, ax
mov bl, dl
mov bh, dh
inc bl
inc bh
mov dx, bx
mov ah, 06h ;draw shadow
mov bh, 0Ch
int 10h
pop dx
pop cx
mov al, cl
mov ah, dh
inc ah
inc al
mov cx, ax
mov bl, dl
mov bh, dh
inc bl
inc bh
mov dx, bx
mov ah, 06h ;draw shadow
mov bh, 0Ch
int 10h
ret
printinrect: printinrect:
push cx
mov bx, dx
push bx
mov ah, 02h ;sets cursor to top to write mov ah, 02h ;sets cursor to top to write
mov bh, 0h mov bh, 0h
mov dh, ch mov dh, ch
mov dl, cl mov dl, cl
int 10h int 10h
.loop: .loop:
lodsb lodsb ; load next char
mov bh, 0 mov bh, 0
mov ah, 0x03 mov ah, 0x03
int 10h int 10h ;read cursor position
push dx
or al,al or al,al
jz .exit jz .exit
cmp dl, 3ah
je .newline
mov ah, 0x0e mov ah, 0x0e
mov bh, 0x00
mov cx, 0x01
int 10h int 10h
pop dx
pop bx
cmp dl, bl
je .newline
push bx
jmp .loop jmp .loop
.exit: .exit:
pop dx
pop bx
pop cx
ret ret
.newline: .newline:
mov dl, 2h pop cx
inc dh push bx
mov ah, 02h ;sets cursor to top to write mov dl, cl ;set column
mov bh, 0h inc dh ;increment row by one, works!
mov ah, 02h ;sets cursor
mov bh, 0h ;page number 0 constant
int 10h int 10h
pop bx
push cx
push bx
jmp .loop jmp .loop
print: print:
lodsb lodsb
or al,al or al,al
@ -336,13 +383,14 @@ project6 db "Zalan / Phantasmagoria", 0
projects dq project1, project2, project3, project4, project5, project6 projects dq project1, project2, project3, project4, project5, project6
helptext db "NOT MY DEFAULT", 0x10, "arises from the defaults of computers. In every application there are settings predefined by their creators, that most of the times stay untouched by us, as users. It's their default, not ours, but it's our fault when we don't change it. Society is made of similar preset frameworks that we take for granted. The graduation projects engage with these different default modes and intervene in their core structure/source/root. You are invited to become root users, active listeners, smart speakers, conscious food consumers, counter trolls, sensorial spectators!",0 helptext db "NOT MY DEFAULT arises from the defaults of computers. In every application there are settings predefined by their creators, that most of the times stay untouched by us, as users. It's their default, not ours, but it's our fault when we don't change it. Society is made of similar preset frameworks that we take for granted. The graduation projects engage with these different default modes and intervene in their core structure/source/root. You are invited to become root users, active listeners, smart speakers, conscious food consumers, counter trolls, sensorial spectators!",0
menuhelp db "F1 Help", 0 menuhelp db "F1 Help", 0
menuselect db " W/S Select Item",0 menuselect db " W/S Select Item",0
menuexit db 0x0D,0x0A," ESC Exit", 0 menuexit db 0x0D,0x0A," ESC Exit", 0
menuenter db " Enter Select",0 menuenter db " Enter Select",0
title db 'NOT MY DEFAULT',0
wolf_error_msg db 'Program not found!',0x0D,0x0A,0 wolf_error_msg db 'Program not found!',0x0D,0x0A,0
wolf_error_msg1 db 'Press any key to restart..',0 wolf_error_msg1 db 'Press any key to restart..',0

Binary file not shown.
Loading…
Cancel
Save