added v2.0
This commit is contained in:
1
07_Operating_System/10_Output_Test/Array.jack
Symbolic link
1
07_Operating_System/10_Output_Test/Array.jack
Symbolic link
@@ -0,0 +1 @@
|
||||
../Array.jack
|
1
07_Operating_System/10_Output_Test/GPIO.jack
Symbolic link
1
07_Operating_System/10_Output_Test/GPIO.jack
Symbolic link
@@ -0,0 +1 @@
|
||||
../GPIO.jack
|
49
07_Operating_System/10_Output_Test/Main.jack
Normal file
49
07_Operating_System/10_Output_Test/Main.jack
Normal file
@@ -0,0 +1,49 @@
|
||||
// This file is part of www.nand2tetris.org
|
||||
// and the book "The Elements of Computing Systems"
|
||||
// by Nisan and Schocken, MIT Press.
|
||||
// File name: projects/12/OutputTest/Main.jack
|
||||
|
||||
/** Test program for the OS Output class. */
|
||||
class Main {
|
||||
|
||||
/** Outputs the entire character set to the screen using all the
|
||||
* methods of the Output class. */
|
||||
function void main() {
|
||||
var String s;
|
||||
|
||||
let s = String.new(1);
|
||||
do s.appendChar(String.doubleQuote());
|
||||
|
||||
do Output.moveCursor(0, 29);
|
||||
do Output.printChar(66);
|
||||
do Output.moveCursor(28, 0);
|
||||
do Output.printChar(67);
|
||||
do Output.moveCursor(28, 29);
|
||||
do Output.printChar(68);
|
||||
do Output.printChar(65);
|
||||
|
||||
do Output.moveCursor(2, 0);
|
||||
do Output.printString("0123456789");
|
||||
do Output.println();
|
||||
|
||||
do Output.printString("ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz");
|
||||
do Output.println();
|
||||
|
||||
do Output.printString("!#$%&'()*+,-./:;<=>?@[\]^_`{|}~");
|
||||
do Output.printString(s);
|
||||
do Output.println();
|
||||
|
||||
do Output.printInt(-12345);
|
||||
do Output.backSpace();
|
||||
do Output.printInt(6789);
|
||||
|
||||
do Screen.setPenColor(Screen.WHITE());
|
||||
do Screen.setBackColor(Screen.RED());
|
||||
|
||||
do Output.moveCursor(10, 0);
|
||||
do Output.printString("Back Color Red");
|
||||
do Output.println();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
18
07_Operating_System/10_Output_Test/Makefile
Normal file
18
07_Operating_System/10_Output_Test/Makefile
Normal file
@@ -0,0 +1,18 @@
|
||||
all: jack vm asm bin sim
|
||||
|
||||
jack:
|
||||
../../tools/JackCompiler/JackCompiler.pyc ./
|
||||
vm:
|
||||
../../tools/VMTranslator/VMTranslator.pyc ./
|
||||
asm:
|
||||
../../tools/Assembler/assembler.pyc out.asm
|
||||
bin:
|
||||
../../tools/AsciiToBin.py out.hack
|
||||
sim:
|
||||
cp out.hack ../00_HACK/ROM.hack
|
||||
upload:
|
||||
iceprogduino -o 64k -w out.bin
|
||||
clean:
|
||||
rm -f *.vm *.asm *.hack *.bin *~
|
||||
|
||||
.PHONY: all clean
|
1
07_Operating_System/10_Output_Test/Math.jack
Symbolic link
1
07_Operating_System/10_Output_Test/Math.jack
Symbolic link
@@ -0,0 +1 @@
|
||||
../Math.jack
|
1
07_Operating_System/10_Output_Test/Memory.jack
Symbolic link
1
07_Operating_System/10_Output_Test/Memory.jack
Symbolic link
@@ -0,0 +1 @@
|
||||
../Memory.jack
|
1
07_Operating_System/10_Output_Test/Output.jack
Symbolic link
1
07_Operating_System/10_Output_Test/Output.jack
Symbolic link
@@ -0,0 +1 @@
|
||||
../Output.jack
|
20
07_Operating_System/10_Output_Test/Readme.md
Normal file
20
07_Operating_System/10_Output_Test/Readme.md
Normal file
@@ -0,0 +1,20 @@
|
||||
## Output.jack
|
||||
|
||||
A library of functions for writing text on the screen.
|
||||
The Hack physical screen consists of 320 rows of 240 pixels each. The library uses a fixed font, in which each character is displayed within a frame which is 11 pixels high (including 1 pixel for inter-line spacing) and 8 pixels wide (including 2 pixels for inter-character spacing). The resulting grid accommodates 29 rows (indexed 0..28, top to bottom) of 30 characters each (indexed 0..29, left to right). The top left character position on the screen is indexed (0,0). A cursor, implemented as a small filled square, indicates where the next character will be displayed.
|
||||
|
||||
***
|
||||
|
||||
### Project
|
||||
|
||||
* implement `Output.jack`
|
||||
* test in real hardware
|
||||
|
||||
```
|
||||
$ cd 09_Output_Test
|
||||
$ make
|
||||
$ make upload
|
||||
```
|
||||
|
||||
* compare your screen with:
|
||||

|
15
07_Operating_System/10_Output_Test/Readme.md.backup
Normal file
15
07_Operating_System/10_Output_Test/Readme.md.backup
Normal file
@@ -0,0 +1,15 @@
|
||||
## Output.jack
|
||||
A library of functions for writing text on the screen.
|
||||
The Hack physical screen consists of 320 rows of 240 pixels each. The library uses a fixed font, in which each character is displayed within a frame which is 11 pixels high (including 1 pixel for inter-line spacing) and 8 pixels wide (including 2 pixels for inter-character spacing). The resulting grid accommodates 29 rows (indexed 0..28, top to bottom) of 30 characters each (indexed 0..29, left to right). The top left character position on the screen is indexed (0,0). A cursor, implemented as a small filled square, indicates where the next character will be displayed.
|
||||
***
|
||||
### Project
|
||||
* implement `Output.jack`
|
||||
* test in real hardware
|
||||
|
||||
```
|
||||
$ cd 09_Output_Test
|
||||
$ make
|
||||
$ make update
|
||||
```
|
||||
* compare your screen with:
|
||||

|
1
07_Operating_System/10_Output_Test/Screen.jack
Symbolic link
1
07_Operating_System/10_Output_Test/Screen.jack
Symbolic link
@@ -0,0 +1 @@
|
||||
../Screen.jack
|
1
07_Operating_System/10_Output_Test/StdIO.jack
Symbolic link
1
07_Operating_System/10_Output_Test/StdIO.jack
Symbolic link
@@ -0,0 +1 @@
|
||||
../StdIO.jack
|
1
07_Operating_System/10_Output_Test/String.jack
Symbolic link
1
07_Operating_System/10_Output_Test/String.jack
Symbolic link
@@ -0,0 +1 @@
|
||||
../String.jack
|
1
07_Operating_System/10_Output_Test/Sys.jack
Symbolic link
1
07_Operating_System/10_Output_Test/Sys.jack
Symbolic link
@@ -0,0 +1 @@
|
||||
../Sys.jack
|
1
07_Operating_System/10_Output_Test/UART.jack
Symbolic link
1
07_Operating_System/10_Output_Test/UART.jack
Symbolic link
@@ -0,0 +1 @@
|
||||
../UART.jack
|
BIN
07_Operating_System/10_Output_Test/output.png
Normal file
BIN
07_Operating_System/10_Output_Test/output.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 84 KiB |
Reference in New Issue
Block a user