about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--cpp/070display.cc48
-rw-r--r--cpp/display.mu8
2 files changed, 56 insertions, 0 deletions
diff --git a/cpp/070display.cc b/cpp/070display.cc
index bf2ff85f..6a94cec9 100644
--- a/cpp/070display.cc
+++ b/cpp/070display.cc
@@ -110,6 +110,54 @@ case MOVE_CURSOR_ON_DISPLAY: {
   break;
 }
 
+:(before "End Primitive Recipe Declarations")
+MOVE_CURSOR_DOWN_ON_DISPLAY,
+:(before "End Primitive Recipe Numbers")
+Recipe_number["move-cursor-down-on-display"] = MOVE_CURSOR_DOWN_ON_DISPLAY;
+:(before "End Primitive Recipe Implementations")
+case MOVE_CURSOR_DOWN_ON_DISPLAY: {
+  Display_row++;
+  tb_set_cursor(Display_column, Display_row);
+  tb_present();
+  break;
+}
+
+:(before "End Primitive Recipe Declarations")
+MOVE_CURSOR_UP_ON_DISPLAY,
+:(before "End Primitive Recipe Numbers")
+Recipe_number["move-cursor-up-on-display"] = MOVE_CURSOR_UP_ON_DISPLAY;
+:(before "End Primitive Recipe Implementations")
+case MOVE_CURSOR_UP_ON_DISPLAY: {
+  Display_row--;
+  tb_set_cursor(Display_column, Display_row);
+  tb_present();
+  break;
+}
+
+:(before "End Primitive Recipe Declarations")
+MOVE_CURSOR_RIGHT_ON_DISPLAY,
+:(before "End Primitive Recipe Numbers")
+Recipe_number["move-cursor-right-on-display"] = MOVE_CURSOR_RIGHT_ON_DISPLAY;
+:(before "End Primitive Recipe Implementations")
+case MOVE_CURSOR_RIGHT_ON_DISPLAY: {
+  Display_column++;
+  tb_set_cursor(Display_column, Display_row);
+  tb_present();
+  break;
+}
+
+:(before "End Primitive Recipe Declarations")
+MOVE_CURSOR_LEFT_ON_DISPLAY,
+:(before "End Primitive Recipe Numbers")
+Recipe_number["move-cursor-left-on-display"] = MOVE_CURSOR_LEFT_ON_DISPLAY;
+:(before "End Primitive Recipe Implementations")
+case MOVE_CURSOR_LEFT_ON_DISPLAY: {
+  Display_column--;
+  tb_set_cursor(Display_column, Display_row);
+  tb_present();
+  break;
+}
+
 //:: Keyboard management
 
 :(before "End Primitive Recipe Declarations")
diff --git a/cpp/display.mu b/cpp/display.mu
index 1b472e7e..2891f91d 100644
--- a/cpp/display.mu
+++ b/cpp/display.mu
@@ -10,5 +10,13 @@ recipe main [
   move-cursor-on-display 0:literal, 0:literal
   clear-line-on-display
   wait-for-key-from-keyboard
+  move-cursor-down-on-display
+  wait-for-key-from-keyboard
+  move-cursor-right-on-display
+  wait-for-key-from-keyboard
+  move-cursor-left-on-display
+  wait-for-key-from-keyboard
+  move-cursor-up-on-display
+  wait-for-key-from-keyboard
   return-to-console
 ]