feat(asm&go4k): Rewrote both library & player to use text/template compiler

There is no more plain .asms, both library & player are created from the templates using go text/template package.
This commit is contained in:
Veikko Sariola
2020-12-14 15:46:12 +02:00
parent 2ad61ff6b2
commit d0bd877b3f
141 changed files with 1195 additions and 5542 deletions

View File

@ -1,4 +1,4 @@
{{- if .Opcode "pop"}}
{{- if .HasOp "pop"}}
;-------------------------------------------------------------------------------
; POP opcode: remove (discard) the topmost signal from the stack
;-------------------------------------------------------------------------------
@ -24,7 +24,7 @@ su_op_pop_mono:
{{end}}
{{- if .Opcode "add"}}
{{- if .HasOp "add"}}
;-------------------------------------------------------------------------------
; ADD opcode: add the two top most signals on the stack
;-------------------------------------------------------------------------------
@ -58,7 +58,7 @@ su_op_add_mono:
{{end}}
{{- if .Opcode "addp"}}
{{- if .HasOp "addp"}}
;-------------------------------------------------------------------------------
; ADDP opcode: add the two top most signals on the stack and pop
;-------------------------------------------------------------------------------
@ -84,7 +84,7 @@ su_op_addp_mono:
{{end}}
{{- if .Opcode "loadnote"}}
{{- if .HasOp "loadnote"}}
;-------------------------------------------------------------------------------
; LOADNOTE opcode: load the current note, scaled to [-1,1]
;-------------------------------------------------------------------------------
@ -109,7 +109,7 @@ su_op_addp_mono:
{{end}}
{{- if .Opcode "mul"}}
{{- if .HasOp "mul"}}
;-------------------------------------------------------------------------------
; MUL opcode: multiply the two top most signals on the stack
;-------------------------------------------------------------------------------
@ -129,7 +129,7 @@ su_op_mul_mono:
{{end}}
{{- if .Opcode "mulp"}}
{{- if .HasOp "mulp"}}
;-------------------------------------------------------------------------------
; MULP opcode: multiply the two top most signals on the stack and pop
;-------------------------------------------------------------------------------
@ -155,7 +155,7 @@ su_op_mulp_mono:
{{end}}
{{- if .Opcode "push"}}
{{- if .HasOp "push"}}
;-------------------------------------------------------------------------------
; PUSH opcode: push the topmost signal on the stack
;-------------------------------------------------------------------------------
@ -181,7 +181,7 @@ su_op_push_mono:
{{end}}
{{- if .Opcode "xch"}}
{{- if .HasOp "xch"}}
;-------------------------------------------------------------------------------
; XCH opcode: exchange the signals on the stack
;-------------------------------------------------------------------------------