nand2/07_Operating_System/07_String_Test
2023-08-04 16:44:31 +02:00
..
Array.jack added v2.0 2023-01-11 23:04:57 +01:00
GPIO.jack added v2.0 2023-01-11 23:04:57 +01:00
Main.jack added v2.0 2023-01-11 23:04:57 +01:00
Makefile changed python tools to python3.11 2023-08-04 16:44:31 +02:00
Math.jack added v2.0 2023-01-11 23:04:57 +01:00
Memory.jack added v2.0 2023-01-11 23:04:57 +01:00
Readme.md added v2.0 2023-01-11 23:04:57 +01:00
Readme.md.backup added v2.0 2023-01-11 23:04:57 +01:00
StdIO.jack added v2.0 2023-01-11 23:04:57 +01:00
String.jack added v2.0 2023-01-11 23:04:57 +01:00
string.png added v2.0 2023-01-11 23:04:57 +01:00
StringTestOutput.gif added v2.0 2023-01-11 23:04:57 +01:00
Sys.jack added v2.0 2023-01-11 23:04:57 +01:00
UART.jack added v2.0 2023-01-11 23:04:57 +01:00

String.jack

Represents character strings. In addition for constructing and disposing strings, the class features methods for getting and setting individual characters of the string, for erasing the string's last character, for appending a character to the string's end, and more typical string-oriented operations.


Project

  • Implement String.jack and at least the function StdIO.printString(String s)

  • Test by running String_Test, which performs several String operation and outputs them to StdIO (UART)

    Hint: Use the debug register to show which caracters are transmitted over UartTX. Add the following code in function UART.writeChar():

    do Memory.Poke(4107,data)
    

  • Run String_Test in real hardware on iCE40HX1K-EVB using a terminal program connected to UART.

  • Compare your terminal output with:

    new,appendChar: abcde
    setInt: 12345
    setInt: -32767
    length: 5
    charAt[2]: 99
    setCharAt(2,'-'): ab-de
    eraseLastChar: abcd
    intValue: 456
    intValue: -32123
    backSpace: 129
    doubleQuote: 34
    newLine: 128