Skip to content

Commit

Permalink
Now with CTRL-Q!
Browse files Browse the repository at this point in the history
I simply changed the ascii Q to extended ascii ctrl-Q, which is 11.
  • Loading branch information
Lim Ding Wen committed Jan 10, 2015
1 parent fab3ba5 commit 7b0b13d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions COMMENTS_sector1
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
sector1 (boot sector) will be loaded into memory 7C00 by BIOS

Running in 16-bit x86 Real Mode.

7C00 to 7C08: Main code

Print welcome message

7C00 MOVDX word 7DC0
7C03 CALL doubleword segment 7D5 offset 0

7C08..7C0F NOP

7C10 XOR byte 11AHAH
Scan and print; typing.

7C10 XOR (reg to rm) byte 11AHAH
7C12 INT byte 16
7C14 CMPAL byte ascii Q
7C14 CMPAL byte 11 (Ctrl-Q ascii)
7C16 JZ byte +8 to 7C20
7C18 MOVAH byte E
7C1A INT byte 10
7C1C JMP byte -E to 7C10

Halt the system.

7C20 CLI
7C21 HLT

To be disposed.

7C30 CLI
7C31 HLT

7D50 to 7DBF: Procedures code

7D50 to 7D6F: String print code (offset 0)

7D50 XOR byte 11CXCX
7D52 XOR byte 11BXBX
7D54 byte 67 MOV byte 00AX100 byte 00CXDX ([DX + CX*1]) (1 = 2^0)
7D50 XOR (reg to rm) byte 11CXCX
7D52 XOR (reg to rm) byte 11BXBX
7D54 byte addr-override 67 MOV byte 00AX100 byte 00CXDX ([DX + CX*1]) (1 = 2^0)
7D58 CMPAL byte 0
7D5A JZ byte +7 to 7D62
7D5C MOVAH byte E
Expand Down
Binary file modified sector1.bin
Binary file not shown.

0 comments on commit 7b0b13d

Please sign in to comment.