21 lines
		
	
	
		
			371 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			371 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
 | 
						|
ca65 a1basic.s -l a1basic.lst
 | 
						|
ld65 -t none a1basic.o -o a1basic.bin
 | 
						|
 | 
						|
# Create ../a1basic.gcl file
 | 
						|
(
 | 
						|
echo '{ Generated by: cd a1basic && ./make.sh }'
 | 
						|
 | 
						|
# Hex dump
 | 
						|
od -v -A n -t x1 a1basic.bin |
 | 
						|
 fmt -1 |
 | 
						|
  awk -v A=57344 '
 | 
						|
   NF>0 {
 | 
						|
    if(A%16==0)print""
 | 
						|
    if(A%256==0)printf"\n*=$%x\n",A
 | 
						|
    printf " #$%-2s",$1
 | 
						|
    A++}
 | 
						|
   END          {print}
 | 
						|
  '
 | 
						|
) > ../a1basic.gcl
 |