When I was in grade 8 I got hooked onto computer programming. The first time I walked past someone in the libray using basic, I knew this was what I wanted to do. After constantly learning how to do new things, constantly making text based games I quickly found "my" limitation in BASIC. I wanted to control hardware, we were looking at PIC16F84's and this was going to be our platform of choice. We started playing with them, but quickly moved back to the PC, this time, with the intent to learn x86 assembly.
I had never been exposed to linux at that time, so wanted to make something I could use free; to replace Windows. Outcame "Joseph's OS". The assembly was first written on paper, during classes trying to work things out. Then I would type it all into windows debug, writing directly to a floppy disk. Those were the days.... untill I met TASM and being able to save source code and assemble!
Well recently I have been reunited with this operating system, which has sparked my love in Assembly once again. After being away from it for almost 10 years. I am going to make a comeback and hopefully pick up where this left off eventually (Hopefully not get stuck making a mouse driver again).
So below we have the OS code and screenshots of it working – with a shoutout to The Lanbox
Boot Screen – This was meant to allow you to choose a wallpaper and load a bitmap. Swear I got atleast somewhere with this.
The shell – The first screen of the OS where you initiate all commands from.
The paint program – The paint program I made, change colours with 1 - 4 and draw with a,s,d,w.
x86 16 Bit assembly – Use TASM to compile
ideal model huge segment code assume CS:code,ES:code,DS:code,SS:code org 100h Entry1: mov ah,00h mov ax,03h int 10h mov ah,0eh mov al,57h mov bl,07h int 10h mov al,61h mov bl,07h int 10h mov al,6ch mov bl,07h int 10h mov al,6ch mov bl,07h int 10h mov al,20h mov bl,07h int 10h mov al,50h mov bl,07h int 10h mov al,61h mov bl,07h int 10h mov al,70h mov bl,07h int 10h mov al,65h mov bl,07h int 10h mov al,72h mov bl,07h int 10h mov al,20h mov bl,07h int 10h mov ah,00h int 16h cmp al,31h jz fg cmp al,32h jz fd cmp al,33h jz fb cmp al,34h jz fk cmp al,35h jz fh jmp Entry1 fh: mov dl,45 jmp entry fk: mov dl,46 jmp entry fb: mov dl,55 jmp entry fg: mov dl,31h jmp entry fd: mov dl,32h jmp entry fc: mov dl,44h jmp entry entry: mov ah,00h mov ax,13h int 10h Border: mov ah,0bh mov bh,0h mov bl,dl int 10h Fancy: mov ah,0ch mov al,03h mov cx,70h mov dx,27h mov bh,00h int 10h lope: inc cx int 10h cmp cx,0d9h jnz lope lote: inc dx int 10h cmp dx,30h jnz lote loke: dec cx int 10h cmp cx,70h jnz loke ling: dec dx int 10h cmp dx,27h jnz ling print_Text: mov ah,02h mov dl,10h mov dh,05h int 10h mov ah,0eh mov al,4fh mov bl,95h int 10h mov al,53h mov bl,95h int 10h mov al,20h mov bl,95h int 10h mov al,4ah mov bl,95h int 10h mov al,6fh mov bl,95h int 10h mov al,73h mov bl,95h int 10h mov al,65h mov bl,95h int 10h mov al,70h mov bl,95h int 10h mov al,68h mov bl,95h int 10h Text: mov ah,02h mov dl,00h mov dh,12h int 10h iinput: mov ah,00h int 16h mov dl,al cmp al,08h jz del cmp al,0dh jz enterr mov ah,0eh mov bl,07h int 10h cmp al,63h jz cleari cmp al,70h jz paint1 jmp iinput del: mov ah,03h mov bh,00h int 10h cmp dl,00h jz backk mov ah,0eh int 10h mov al,20h int 10h mov al,08h int 10h jmp iinput cleari: call clear enterr: mov ah,03h mov bh,0h int 10h mov ah,02h inc dh mov dl,00h int 10h jmp iinput backk: cmp dh,12h jz iinput mov ah,02h mov dl,27h dec dh int 10h mov ah,0eh mov al,20h int 10h mov ah,02h mov dl,27h int 10h jmp iinput gamm: jmp entry iiinput: jmp iinput paint2: jmp paint1 qut: jmp gamm clear: mov ah,00h int 16h mov ah,0eh mov bl,07h int 10h cmp al,6ch jnz iiinput jmp entry paint1: mov ah,00h mov al,13h int 10h painstart: mov ah,0ch mov cx,30h mov dx,30h mov bh,00h mov al,04h int 10h mov bl,04h move1: mov ah,0ch mov al,bl mov bh,00h int 10h mov ah,00h int 16h mov al,al cmp al,77h jz up1 cmp al,71h jz qut cmp al,73h jz down1 cmp al,61h jz left1 cmp al,64h jz right1 cmp al,31h jz color1 cmp al,32h jz color2 cmp al,33h jz color3 cmp al,34h jz color4 cmp al,35h jz color5 jmp move1 color1: mov bl,00h jmp move1 color2: mov bl,04h jmp move1 color3: mov bl,02h jmp move1 color4: mov bl,03h jmp move1 color5: mov bl,05h jmp move1 up1: mov ah,0ch cmp dx,00h jz move1 sub dx,1 mov al,04h int 10h jmp move1 down1: cmp dx,70h jz move1 inc dx jmp move1 left1: cmp cx,00h jz move1 dec cx jmp move1 right1: cmp cx,0afh jz move1 inc cx jmp move1 ends code end entry1