From ea45c9421ebdb922248b14bf9036e7149513500d Mon Sep 17 00:00:00 2001 From: Mattias Hansson Date: Fri, 17 Apr 2026 16:30:07 +0200 Subject: [PATCH] Simplified compile and start scripts in all examples --- examples/for_byte_max_test/cm.sh | 19 ++----------------- examples/for_byte_max_test/start_in_vice.sh | 2 +- examples/hires/cm.sh | 19 ++----------------- examples/hires/start_in_vice.sh | 2 +- examples/memlib_demo/cm.sh | 19 ++----------------- examples/memlib_demo/start_in_vice.sh | 2 +- examples/multicolorbm/cm.sh | 19 ++----------------- examples/multicolorbm/start_in_vice.sh | 2 +- examples/script_library_demo/cm.sh | 19 ++----------------- examples/script_library_demo/start_in_vice.sh | 2 +- examples/shift_demo/cm.sh | 19 ++----------------- examples/shift_demo/start_in_vice.sh | 2 +- examples/switch_demo/cm.sh | 19 ++----------------- examples/switch_demo/start_in_vice.sh | 2 +- lib/c64start.c65 | 1 - 15 files changed, 21 insertions(+), 127 deletions(-) mode change 100644 => 100755 examples/for_byte_max_test/start_in_vice.sh mode change 100644 => 100755 examples/hires/start_in_vice.sh mode change 100644 => 100755 examples/memlib_demo/start_in_vice.sh mode change 100644 => 100755 examples/multicolorbm/start_in_vice.sh mode change 100644 => 100755 examples/script_library_demo/start_in_vice.sh mode change 100644 => 100755 examples/shift_demo/start_in_vice.sh mode change 100644 => 100755 examples/switch_demo/start_in_vice.sh diff --git a/examples/for_byte_max_test/cm.sh b/examples/for_byte_max_test/cm.sh index 39ec4eb..e1101cf 100755 --- a/examples/for_byte_max_test/cm.sh +++ b/examples/for_byte_max_test/cm.sh @@ -1,20 +1,5 @@ #!/bin/sh # Define filename as variable PROGNAME="for_byte_max_test" -# Only set C65LIBPATH if not already defined -if [ -z "$C65LIBPATH" ]; then - export C65LIBPATH=$(readlink -f "../../lib") -fi -# Compile -c65gm -in ${PROGNAME}.c65 -out ${PROGNAME}.s -if [ $? -ne 0 ]; then - echo "Compilation terminated" - exit 1 -fi -echo assemble. -acme ${PROGNAME}.s -if [ -f ${PROGNAME}.prg ]; then - rm ${PROGNAME}.prg -fi -# main.bin ${PROGNAME}.prg -mv main.bin main.prg +# Compile and assemble directly +c65gm ${PROGNAME}.c65 diff --git a/examples/for_byte_max_test/start_in_vice.sh b/examples/for_byte_max_test/start_in_vice.sh old mode 100644 new mode 100755 index 865c48e..1a9c2a0 --- a/examples/for_byte_max_test/start_in_vice.sh +++ b/examples/for_byte_max_test/start_in_vice.sh @@ -1 +1 @@ -x64 -autostartprgmode 1 main.prg +x64 -autostartprgmode 1 for_byte_max_test.prg diff --git a/examples/hires/cm.sh b/examples/hires/cm.sh index 984cb79..de9eb50 100755 --- a/examples/hires/cm.sh +++ b/examples/hires/cm.sh @@ -1,20 +1,5 @@ #!/bin/sh # Define filename as variable PROGNAME="hires" -# Only set C65LIBPATH if not already defined -if [ -z "$C65LIBPATH" ]; then - export C65LIBPATH=$(readlink -f "../../lib") -fi -# Compile -c65gm -in ${PROGNAME}.c65 -out ${PROGNAME}.s -if [ $? -ne 0 ]; then - echo "Compilation terminated" - exit 1 -fi -echo assemble. -acme ${PROGNAME}.s -if [ -f ${PROGNAME}.prg ]; then - rm ${PROGNAME}.prg -fi -# main.bin ${PROGNAME}.prg -mv main.bin main.prg \ No newline at end of file +# Compile and assemble directly +c65gm ${PROGNAME}.c65 \ No newline at end of file diff --git a/examples/hires/start_in_vice.sh b/examples/hires/start_in_vice.sh old mode 100644 new mode 100755 index 865c48e..60df212 --- a/examples/hires/start_in_vice.sh +++ b/examples/hires/start_in_vice.sh @@ -1 +1 @@ -x64 -autostartprgmode 1 main.prg +x64 -autostartprgmode 1 hires.prg diff --git a/examples/memlib_demo/cm.sh b/examples/memlib_demo/cm.sh index b054420..da08fdd 100755 --- a/examples/memlib_demo/cm.sh +++ b/examples/memlib_demo/cm.sh @@ -1,20 +1,5 @@ #!/bin/sh # Define filename as variable PROGNAME="memlib_demo" -# Only set C65LIBPATH if not already defined -if [ -z "$C65LIBPATH" ]; then - export C65LIBPATH=$(readlink -f "../../lib") -fi -# Compile -c65gm -in ${PROGNAME}.c65 -out ${PROGNAME}.s -if [ $? -ne 0 ]; then - echo "Compilation terminated" - exit 1 -fi -echo assemble. -acme ${PROGNAME}.s -if [ -f ${PROGNAME}.prg ]; then - rm ${PROGNAME}.prg -fi -# main.bin ${PROGNAME}.prg -mv main.bin main.prg +# Compile and assemble directly +c65gm ${PROGNAME}.c65 diff --git a/examples/memlib_demo/start_in_vice.sh b/examples/memlib_demo/start_in_vice.sh old mode 100644 new mode 100755 index 865c48e..f756186 --- a/examples/memlib_demo/start_in_vice.sh +++ b/examples/memlib_demo/start_in_vice.sh @@ -1 +1 @@ -x64 -autostartprgmode 1 main.prg +x64 -autostartprgmode 1 memlib_demo.prg diff --git a/examples/multicolorbm/cm.sh b/examples/multicolorbm/cm.sh index 376b39b..5c63744 100755 --- a/examples/multicolorbm/cm.sh +++ b/examples/multicolorbm/cm.sh @@ -1,20 +1,5 @@ #!/bin/sh # Define filename as variable PROGNAME="multicolorbm" -# Only set C65LIBPATH if not already defined -if [ -z "$C65LIBPATH" ]; then - export C65LIBPATH=$(readlink -f "../../lib") -fi -# Compile -c65gm -in ${PROGNAME}.c65 -out ${PROGNAME}.s -if [ $? -ne 0 ]; then - echo "Compilation terminated" - exit 1 -fi -echo assemble. -acme ${PROGNAME}.s -if [ -f ${PROGNAME}.prg ]; then - rm ${PROGNAME}.prg -fi -# main.bin ${PROGNAME}.prg -mv main.bin main.prg \ No newline at end of file +# Compile and assemble directly +c65gm ${PROGNAME}.c65 \ No newline at end of file diff --git a/examples/multicolorbm/start_in_vice.sh b/examples/multicolorbm/start_in_vice.sh old mode 100644 new mode 100755 index 865c48e..6674316 --- a/examples/multicolorbm/start_in_vice.sh +++ b/examples/multicolorbm/start_in_vice.sh @@ -1 +1 @@ -x64 -autostartprgmode 1 main.prg +x64 -autostartprgmode 1 multicolorbm.prg diff --git a/examples/script_library_demo/cm.sh b/examples/script_library_demo/cm.sh index 58e35f4..2585626 100755 --- a/examples/script_library_demo/cm.sh +++ b/examples/script_library_demo/cm.sh @@ -1,20 +1,5 @@ #!/bin/sh # Define filename as variable PROGNAME="script_library_demo" -# Only set C65LIBPATH if not already defined -if [ -z "$C65LIBPATH" ]; then - export C65LIBPATH=$(readlink -f "../../lib") -fi -# Compile -c65gm -in ${PROGNAME}.c65 -out ${PROGNAME}.s -if [ $? -ne 0 ]; then - echo "Compilation terminated" - exit 1 -fi -echo assemble. -acme ${PROGNAME}.s -if [ -f ${PROGNAME}.prg ]; then - rm ${PROGNAME}.prg -fi -# main.bin ${PROGNAME}.prg -mv main.bin main.prg +# Compile and assemble directly +c65gm ${PROGNAME}.c65 diff --git a/examples/script_library_demo/start_in_vice.sh b/examples/script_library_demo/start_in_vice.sh old mode 100644 new mode 100755 index 865c48e..f01a0eb --- a/examples/script_library_demo/start_in_vice.sh +++ b/examples/script_library_demo/start_in_vice.sh @@ -1 +1 @@ -x64 -autostartprgmode 1 main.prg +x64 -autostartprgmode 1 script_library_demo.prg diff --git a/examples/shift_demo/cm.sh b/examples/shift_demo/cm.sh index 0a06181..a670090 100755 --- a/examples/shift_demo/cm.sh +++ b/examples/shift_demo/cm.sh @@ -1,20 +1,5 @@ #!/bin/sh # Define filename as variable PROGNAME="shift_demo" -# Only set C65LIBPATH if not already defined -#if [ -z "$C65LIBPATH" ]; then -# export C65LIBPATH=$(readlink -f "../../lib") -#fi -# Compile - use absolute path to c65gm -c65gm -in ${PROGNAME}.c65 -out ${PROGNAME}.s -if [ $? -ne 0 ]; then - echo "Compilation terminated" - exit 1 -fi -echo assemble. -acme ${PROGNAME}.s -if [ -f ${PROGNAME}.prg ]; then - rm ${PROGNAME}.prg -fi -# main.bin ${PROGNAME}.prg -mv main.bin main.prg +# Compile and assemble directly +c65gm ${PROGNAME}.c65 diff --git a/examples/shift_demo/start_in_vice.sh b/examples/shift_demo/start_in_vice.sh old mode 100644 new mode 100755 index 1e9473f..7363bf4 --- a/examples/shift_demo/start_in_vice.sh +++ b/examples/shift_demo/start_in_vice.sh @@ -1 +1 @@ -x64 -autostartprgmode 1 main.prg \ No newline at end of file +x64 -autostartprgmode 1 shift_demo.prg \ No newline at end of file diff --git a/examples/switch_demo/cm.sh b/examples/switch_demo/cm.sh index 5a5e431..8cdf8cf 100755 --- a/examples/switch_demo/cm.sh +++ b/examples/switch_demo/cm.sh @@ -1,20 +1,5 @@ #!/bin/sh # Define filename as variable PROGNAME="switch_demo" -# Only set C65LIBPATH if not already defined -if [ -z "$C65LIBPATH" ]; then - export C65LIBPATH=$(readlink -f "../../lib") -fi -# Compile -c65gm -in ${PROGNAME}.c65 -out ${PROGNAME}.s -if [ $? -ne 0 ]; then - echo "Compilation terminated" - exit 1 -fi -echo assemble. -acme ${PROGNAME}.s -if [ -f ${PROGNAME}.prg ]; then - rm ${PROGNAME}.prg -fi -# main.bin ${PROGNAME}.prg -mv main.bin main.prg +# Compile and assemble directly +c65gm ${PROGNAME}.c65 diff --git a/examples/switch_demo/start_in_vice.sh b/examples/switch_demo/start_in_vice.sh old mode 100644 new mode 100755 index 865c48e..7e2fdec --- a/examples/switch_demo/start_in_vice.sh +++ b/examples/switch_demo/start_in_vice.sh @@ -1 +1 @@ -x64 -autostartprgmode 1 main.prg +x64 -autostartprgmode 1 switch_demo.prg diff --git a/lib/c64start.c65 b/lib/c64start.c65 index 9adf102..90af469 100644 --- a/lib/c64start.c65 +++ b/lib/c64start.c65 @@ -21,7 +21,6 @@ ORIGIN $0801 #DEFINE MACHINE_C64 = 1 ASM - !to "main.bin", cbm ; The output file definition (add CBM starting address) !sl "main.sym" ; save the symbols to separate file !cpu 6502 ; The processor definition ; basic line "0 sys 2064"