Skip to content

Commit

Permalink
Fixed INC and DEC and also shrunk them (I learnt how to contact memory
Browse files Browse the repository at this point in the history
directly).

Also fixed backspace in the process! :)
  • Loading branch information
Lim Ding Wen committed Jan 14, 2015
1 parent c357df5 commit 6f2513e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions COMMENTS_sector1
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ Handle putting characters into input buffer. Check overflow.
Put into buffer

7C76 MOV (reg to r/m) byte 10AL111 word +501 ([BX + 501])
7C7A INCBL
7C7B MOV (reg to r/m) byte 00BL110 word 500
7C7A NOP
7C7B INC byte 00000110 word 500
7C7F NOP
7C80 NOP
7C81 RET
Expand Down Expand Up @@ -129,7 +129,7 @@ Handle backspace

7CC6 CMP (immediate8) byte 00000110 word 500 byte 0
7CCB JZ byte -6D to 7C60 (don't print, return to read immediately)
7CCD DEC byte 00000110 word 500
7CCD DEC byte 00001110 word 500
7CD1 JMP byte -6F to 7C64 (print but don't handle as normal
character -- don't input into buffer)

Expand Down
Binary file modified sector1.bin
Binary file not shown.

5 comments on commit 6f2513e

@froidlesprit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. I heard about your TestOS on Quora, but I can't seem to find the boot.img file.

@limdingwen
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Fanofoneplus, thanks for checking it out. You need to run the compile.sh file to generate the boot.img file.

What the script does is simple: It basically generates a file named "boot.img" that is filled with 1.44MB worth of 0s, then copies sector1.bin (the program) into the first 512 bytes of boot.img, creating a bootable floppy disk.

@froidlesprit
Copy link

@froidlesprit froidlesprit commented on 6f2513e Oct 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks. I'm new to github, and I have no clue how any of it works, but I do know how to run .sh on bash command lines, but I mainly use windows 8.1, so do you have instructions for that? Also, have you tried menuet OS before? It's built entirely in assembly and fits on a floppy, but it has programs and a GUI. I'll run Test in a vm tomorrow, when I have time. I think you won the prize for most obscure operating system. Is there anything I can do to make it more popular? Maybe try to make a graphical UI.

@limdingwen
Copy link
Owner

@limdingwen limdingwen commented on 6f2513e Oct 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. ...but I mainly use windows 8.1, so do you have instructions for that?

The tutorial that I used describes how to make the virtual floppy disk in Windows. It's in the section "How to use VFD (Virtual Floppy Drive)" and "PartCopy - Copying to the Bootsector".

I've created the latest boot.img for you though. The download link is here (expires after 30 days).

From there you can just follow README.md and use Virtualbox to run it.

  1. Also, have you tried menuet OS before?

Yes, and I think it's really cool! I've also tried KolibriOS and I think I might actually try to make some programs for it, or try using it as a work environment.

  1. I think you won the prize for most obscure operating system.

Haha, thanks, I guess. x3 I tried to make it well documented through COMMENTS_sector1 though. But due to using hex instead of assembly, it's harder to rearrange code and add features.

  1. Is there anything I can do to make it more popular?

I don't need popularity, I just enjoy doing these things. But if you want to show it to your friends, sure! I don't see why not.

(Bare metal programs are cool!)

  1. Maybe try to make a graphical UI.

Hmm, that seems to be out of reach in 512 bytes. Furthermore, my code is already designed for text (printing functions, prompt etc) so I don't think I could do that. Sorry.

Once again, this isn't a real OS, just a test (hence the name), like a "hello world" for bare metal programs. I also kind of regret calling it an OS since it isn't one at all; it's just a program... a program that runs on bare metal. :)

"An OS is just a program that runs other programs."

@froidlesprit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Running Test in a VM right now. I'll also go check out Kolibri.

Please sign in to comment.