new functions and sorted out memory addresses / sectors

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

@ -24,7 +24,7 @@ welcome:
xor al, al ; and clear entire screen
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 bh, 1Eh ; YellowOnBlue
mov bh, 1Fh ; YellowOnBlue
int 10h

Binary file not shown.

Binary file not shown.

@ -15,23 +15,29 @@ start:
mov bh, 1Eh ; YellowOnBlue
int 10H ; execute interrupt
mov ah, 06h; top bar, make background
xor cx, cx
mov dx, 0x004F
mov bh, 30h
int 10h
mov ah, 02h ;top bar setting the position and then write title $
mov bh, 0h
mov dh, 0h
mov dl, 20h
int 10h
mov si, title
call print
mov ah, 06h ;draw rect on background
mov cx, 0101h
mov cx, 0201h
mov dx, 124Dh
mov bh, 3Eh
int 10h
mov ah, 06h ;draw shadow
mov cx, 1302h
mov dx, 134Eh
mov bh, 0Eh
int 10h
mov ah, 06h ;draw shadow
mov cx, 024Eh
mov dx, 134Eh
mov bh, 0Eh
int 10h
call drawshadow
; menu bottom
mov ah, 06h ;draw rect on background
@ -163,27 +169,17 @@ help:
mov bx, 1
mov [helpon], bx
mov ah, 06h ;draw rect on background
mov cx, 0610h
mov dx, 103Ah
mov cx, 040Fh
mov dx, 113Eh
mov bh, 70h
int 10h
push dx
push cx
mov si, helptext
call printinrect
; mov ah, 06h ;draw shadow
; 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
pop cx
pop dx
call drawshadow
jmp waitforkey
@ -206,27 +202,27 @@ loadproject:
.one
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
.two
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
.three
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
.four
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
.five
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
.six
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
@ -269,42 +265,93 @@ wolf_error:
xor ax,ax
int 19h
;--------
;ch=row
;cl=column
;dh=row
;dl=column
;--------
;------------;
;ch=row ;
;cl=column ;
;dh=row ;
;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:
push cx
mov bx, dx
push bx
mov ah, 02h ;sets cursor to top to write
mov bh, 0h
mov dh, ch
mov dl, cl
int 10h
.loop:
lodsb
lodsb ; load next char
mov bh, 0
mov ah, 0x03
int 10h
or al,al
int 10h ;read cursor position
push dx
or al,al
jz .exit
cmp dl, 3ah
je .newline
mov ah, 0x0e
int 10h
mov bh, 0x00
mov cx, 0x01
int 10h
pop dx
pop bx
cmp dl, bl
je .newline
push bx
jmp .loop
.exit:
pop dx
pop bx
pop cx
ret
.newline:
mov dl, 2h
inc dh
mov ah, 02h ;sets cursor to top to write
mov bh, 0h
pop cx
push bx
mov dl, cl ;set column
inc dh ;increment row by one, works!
mov ah, 02h ;sets cursor
mov bh, 0h ;page number 0 constant
int 10h
pop bx
push cx
push bx
jmp .loop
print:
lodsb
or al,al
@ -336,13 +383,14 @@ project6 db "Zalan / Phantasmagoria", 0
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
menuselect db " W/S Select Item",0
menuexit db 0x0D,0x0A," ESC Exit", 0
menuenter db " Enter Select",0
title db 'NOT MY DEFAULT',0
wolf_error_msg db 'Program not found!',0x0D,0x0A,0
wolf_error_msg1 db 'Press any key to restart..',0

Binary file not shown.
Loading…
Cancel
Save