From 5549b8379fbdadbb520e3ec62271a2b93f7b10e9 Mon Sep 17 00:00:00 2001 From: Chris Pressey Date: Sun, 9 Sep 2018 14:01:38 +0100 Subject: [PATCH] More conversion. --- eg/apple2/lores.60p | 2 +- eg/apple2/print.60p | 5 ++--- eg/c64/demo-game/demo-game.60p | 8 ++++---- eg/c64/hearts.60p | 2 +- eg/c64/intr1.60p | 4 ++-- eg/c64/joystick.60p | 4 ++-- eg/c64/screen1.60p | 2 +- 7 files changed, 13 insertions(+), 14 deletions(-) diff --git a/eg/apple2/lores.60p b/eg/apple2/lores.60p index ac88a4c..c68e6dd 100644 --- a/eg/apple2/lores.60p +++ b/eg/apple2/lores.60p @@ -7,7 +7,7 @@ byte ds_page2 @ $C055 byte ds_lores @ $C056 byte ds_hires @ $C057 -routine main +define main routine inputs a outputs ds_lores, ds_page1, ds_split, ds_graphics trashes a, z, n diff --git a/eg/apple2/print.60p b/eg/apple2/print.60p index aa72441..9dd0b5e 100644 --- a/eg/apple2/print.60p +++ b/eg/apple2/print.60p @@ -1,12 +1,11 @@ // Write ">AB>" to "standard output" -routine cout +define cout routine inputs a trashes a @ $FDED -routine main - inputs a +define main routine trashes a, z, n { ld a, 62 diff --git a/eg/c64/demo-game/demo-game.60p b/eg/c64/demo-game/demo-game.60p index a521e30..69ade0d 100644 --- a/eg/c64/demo-game/demo-game.60p +++ b/eg/c64/demo-game/demo-game.60p @@ -121,7 +121,7 @@ vector game_state_routine // Utility Routines // ---------------------------------------------------------------- -routine read_stick +define read_stick routine inputs joy2 outputs delta trashes a, x, z, n @@ -186,7 +186,7 @@ define check_button routine } } -routine clear_screen +define clear_screen routine outputs screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4 trashes a, y, c, n, z { @@ -209,7 +209,7 @@ routine clear_screen } until z } -routine calculate_new_position +define calculate_new_position routine inputs pos, delta outputs new_pos trashes a, c, n, z, v @@ -243,7 +243,7 @@ define check_new_position_in_bounds routine } } -routine init_game +define init_game routine inputs actor_pos, actor_delta, actor_logic outputs actor_pos, actor_delta, actor_logic, player_died trashes pos, a, y, z, n, c, v diff --git a/eg/c64/hearts.60p b/eg/c64/hearts.60p index 43df36d..3a69adf 100644 --- a/eg/c64/hearts.60p +++ b/eg/c64/hearts.60p @@ -3,7 +3,7 @@ // Define where the screen starts in memory: byte table[256] screen @ 1024 -routine main +define main routine // These are the values that will be written to by this routine: trashes a, x, z, n, screen { diff --git a/eg/c64/intr1.60p b/eg/c64/intr1.60p index 68cad5c..b817d18 100644 --- a/eg/c64/intr1.60p +++ b/eg/c64/intr1.60p @@ -24,7 +24,7 @@ vector routine trashes z, n save_cinv -routine our_cinv +define our_cinv routine inputs vic_border outputs vic_border trashes z, n @@ -33,7 +33,7 @@ routine our_cinv goto save_cinv } -routine main +define main routine inputs cinv outputs cinv, save_cinv trashes a, n, z diff --git a/eg/c64/joystick.60p b/eg/c64/joystick.60p index 8783bd7..fdbaa83 100644 --- a/eg/c64/joystick.60p +++ b/eg/c64/joystick.60p @@ -3,7 +3,7 @@ byte joy2 @ $dc00 word delta -routine read_stick +define read_stick routine inputs joy2 outputs delta trashes a, x, z, n @@ -36,7 +36,7 @@ routine read_stick } } -routine main +define main routine inputs joy2 outputs delta trashes a, x, z, n, screen diff --git a/eg/c64/screen1.60p b/eg/c64/screen1.60p index 5a96691..a855d51 100644 --- a/eg/c64/screen1.60p +++ b/eg/c64/screen1.60p @@ -1,6 +1,6 @@ byte screen @ 1024 -routine main +define main routine trashes a, z, n, screen { ld a, 83