def prog(v):
	return [
	17, # offset where to put the value v. Not used by this side but used by the emulator-side test.
	0x08, # PHP
	0x48,# PHA
	0x8a, # TXA
	0x48, # PHA
	0x98, # TYA
	0x48, # PHA
	0xd8, # CLD
	0x18, # CLC
	0xa9, 0x7F, # LDA#$7F
	0x69, 1, # ADC# 1 # set overflow
	0xa9, 0, # LDA# 0
	0x18, # CLC [3]
	# so now we have flags: .V1...Z., A=0
	0xa9, v, # LDA# v
	0x69, 0, # ADC# $00 [2] # begins at address $12
	0x08, # PHP
	0x68, # PLA
	0x8D, 0x00, 0x07, # STAa $0700 [1] # at address $16
	0xEE, 0x17, 0x06, # INC [1] # at address $19
	0xEE, 0x13, 0x06, # INC [2] # at address $1C
	0xD0, 0xEE, # BNE [3] # at address $1F
	# footer
	0x68, # PLA
	0xA8, # TAY
	0x68, # PLA
	0xAA, # TAX
	0x68, # PLA
	0x28, # PLP
	0x60, # RTS
	]
