; Copyright (c) 2023 - 2025 kio@little-bat.de
; BSD-2-Clause license
; https://opensource.org/licenses/BSD-2-Clause
;
; based on:
; Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
; SPDX-License-Identifier: BSD-3-Clause


.program  timing

public entry_point:
		pull block		; todo could be done with pio_exec

.wrap_target
new_state:
		out exec, 16	; this does any per state inline work (or it can be a JMP to entry_point to sleep..
						; note the EXECed instruction should have a side set 0
		out x, 14	  
		out pins, 2		; we want an OUT EXEC above which sets an IRQ to start scanline output
						; to cause this out and the pixel out in the same cycle (this would be positive clk edge latch)
loop:
		nop           
		jmp x-- loop  
.wrap


