add printrect

master
Your Name 5 years ago
parent 28cc917fe1
commit 84769bcb1e

@ -16,13 +16,13 @@ image : compile
sudo dd if=/dev/zero of=disk.img bs=1024 count=720
#cat boot.bin program.bin > exe.bin
sudo dd if=boot.bin of=disk.img bs=512 count=1 conv=notrunc
sudo dd if=program.bin of=disk.img bs=512 seek=1 count=2 conv=notrunc
sudo dd if=software.bin of=disk.img bs=512 seek=3 count=1 conv=notrunc
sudo dd if=food.bin of=disk.img bs=512 seek=4 count=1 conv=notrunc
sudo dd if=beep.bin of=disk.img bs=512 seek=5 count=1 conv=notrunc
sudo dd if=voice.bin of=disk.img bs=512 seek=6 count=1 conv=notrunc
sudo dd if=silence.bin of=disk.img bs=512 seek=7 count=1 conv=notrunc
sudo dd if=light.bin of=disk.img bs=512 seek=8 count=1 conv=notrunc
sudo dd if=program.bin of=disk.img bs=512 seek=1 count=3 conv=notrunc
sudo dd if=software.bin of=disk.img bs=512 seek=4 count=1 conv=notrunc
sudo dd if=food.bin of=disk.img bs=512 seek=5 count=1 conv=notrunc
sudo dd if=beep.bin of=disk.img bs=512 seek=6 count=1 conv=notrunc
sudo dd if=voice.bin of=disk.img bs=512 seek=7 count=1 conv=notrunc
sudo dd if=silence.bin of=disk.img bs=512 seek=8 count=1 conv=notrunc
sudo dd if=light.bin of=disk.img bs=512 seek=9 count=1 conv=notrunc
flashusb : image

@ -79,7 +79,7 @@ load_it_all_1:
mov bx, 0x1000 ; BX = 0x1000. ES:BX=0x0:0x1000
; ES:BX = starting address to read sector(s) into
mov ah, 02 ; Int 13h/AH=2 = Read Sectors From Drive
mov al, 0x02 ; Sectors to read = 1
mov al, 0x03 ; Sectors to read = 1
mov ch, 00 ; CH=Cylinder. Second sector of disk
; is at Cylinder 0 not 1
mov cl, 02 ; Sector to read = 2

Binary file not shown.

Binary file not shown.

@ -2,6 +2,8 @@
start:
mov [bootdev], dl
mov bx, 0
mov [helpon], bx
mov ah, 01h ;make cursor invisible
mov cx, 2607h
int 10h
@ -125,6 +127,8 @@ waitforkey:
je loadproject
cmp ah, 01h
je goback
cmp ah, 3Bh
je help
jmp waitforkey
.up
@ -155,6 +159,32 @@ waitforkey:
jmp print_projects
help:
mov bx, 1
mov [helpon], bx
mov ah, 06h ;draw rect on background
mov cx, 0610h
mov dx, 103Ah
mov bh, 70h
int 10h
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
jmp waitforkey
loadproject:
@ -239,23 +269,61 @@ wolf_error:
xor ax,ax
int 19h
;--------
;ch=row
;cl=column
;dh=row
;dl=column
;--------
printinrect:
mov ah, 02h ;sets cursor to top to write
mov bh, 0h
mov dh, ch
mov dl, cl
int 10h
.loop:
lodsb
mov bh, 0
mov ah, 0x03
int 10h
or al,al
jz .exit
cmp dl, 3ah
je .newline
mov ah, 0x0e
int 10h
jmp .loop
.exit:
ret
.newline:
mov dl, 2h
inc dh
mov ah, 02h ;sets cursor to top to write
mov bh, 0h
int 10h
jmp .loop
print:
lodsb
or al,al
jz exit
jz .exit
mov ah,0x0e
int 10h
jmp print
exit:
.exit:
ret
goback:
mov dl, [bootdev]
mov dl, [bootdev]
mov ax, [helpon]
cmp ax, 1
je start
jmp 0x0:0x7c00
hlt
helpon dw 0
msg1 db "ARTIST / TITLE",0
@ -268,11 +336,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
menuhelp db "F1 Help", 0
menuselect db " W/S Select Item",0
menuexit db 0x0D,0x0A," ESC Exit", 0
menuenter db " Enter Select",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