mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-08 15:29:09 +00:00
Makes collated text easier to read.
This commit is contained in:
parent
da0a9113d4
commit
e0475343f5
@ -96,7 +96,14 @@ class PatrikRakTests: XCTestCase, CSTestMachineTrapHandler {
|
|||||||
let testMachineZ80 = testMachine as! CSTestMachineZ80
|
let testMachineZ80 = testMachine as! CSTestMachineZ80
|
||||||
switch address {
|
switch address {
|
||||||
case 0x0010:
|
case 0x0010:
|
||||||
let textToAppend = UnicodeScalar(testMachineZ80.value(for: .A))!
|
var characterCode = testMachineZ80.value(for: .A)
|
||||||
|
|
||||||
|
// Of the control codes, retain only new line. Map the rest to space.
|
||||||
|
if characterCode < 32 && characterCode != 13 {
|
||||||
|
characterCode = 32
|
||||||
|
}
|
||||||
|
|
||||||
|
let textToAppend = UnicodeScalar(characterCode)!
|
||||||
output += String(textToAppend)
|
output += String(textToAppend)
|
||||||
print(textToAppend, terminator:"")
|
print(textToAppend, terminator:"")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user