@@ -54,7 +54,7 @@ $(TEST_DIR)/realmode.flat: $(TEST_DIR)/realmode.o
$(TEST_DIR)/realmode.o: bits = 32
-$(TEST_DIR)/stringio.flat: $(TEST_DIR)/stringio.o
+$(TEST_DIR)/stringio.flat: $(cstart.o) $(TEST_DIR)/stringio.o
$(TEST_DIR)/msr.flat: $(cstart.o) $(TEST_DIR)/msr.o
@@ -8,24 +8,29 @@
1:
.endm
+TESTDEV_PORT = 0xf1
+
str "forward", "forward"
str "backward", "backward"
.text
-
+.global main
+main:
cld
movl forward, %ecx
lea 4+forward, %rsi
- movw $1, %dx
+ movw $TESTDEV_PORT, %dx
rep outsb
std
movl backward, %ecx
lea 4+backward-1(%rcx), %rsi
- movw $2, %dx
+ movw $TESTDEV_PORT, %dx
rep outsb
- hlt
+ mov $0, %rsi
+ call exit
+