ceda2vga/src/vga.pio

49 lines
581 B
Plaintext

.program vga_free_run
entrypoint_vga_free_run:
pull
loop:
out pins, 1 [2]
jmp loop
.program vga_hsync
entrypoint_vga_hsync:
pull
mov isr, osr
pull
loope:
set y, 15
loop:
mov x, isr
set pins, 0
hsync_pulse:
jmp x-- hsync_pulse
mov x, osr
set pins, 1
hsync_idle:
jmp x-- hsync_idle
jmp y-- loop
irq set 0
jmp loope
.program vga_vsync
entrypoint_vga_vsync:
pull
mov isr, osr
pull
loop:
wait irq 0
mov x, isr
set pins, 0
vsync_pulse:
jmp x-- vsync_pulse
set pins, 1
jmp loop