ARC-stuff
/
loda-rust
/rust_project
/arc-competition
/payload
/loda-arc-challenge
/programs
/0d3d703e-2.asm
; ARC:0d3d703e | |
; Submitted by Simon Strandgaard | |
; Program Type: advanced | |
mov 0 ; palette image accumulated | ,|
; process "train" vector | |
mov set iteration counter = length of "train" vector | , ;|
mov 100 ; address of first training data train[0].input | ,|
mov 101 ; address of first training data train[0].output | ,|
lps | |
mov 81 ; load train[x].input image | ,$$|
mov 82 ; load train[x].output image | ,$$|
; analyze the images | |
f21 101132 ; build palette image with color mapping from input to output | ,|
mov | ,|
f21 101030 ; hstack of the palette images | ,|
; next iteration | |
add ,100 ; jump to address of next training input image | |
add ,100 ; jump to address of next training output image | |
lpe | |
; process "train"+"test" vectors | |
mov set iteration counter = length of "train"+"test" vectors | , ;|
mov 100 ; address of vector[0].input | ,|
mov 102 ; address of vector[0].computed_output | ,|
lps | |
mov 81 ; load vector[x].input image | ,$$|
; replace colors of the image using the palette image | |
mov | , ; palette image|
f21 101052 ; replace colors using palette image | ,|
mov $$82, ; save vector[x].computed_output image | |
; next iteration | |
add ,100 ; jump to address of next input image | |
add ,100 ; jump to address of next computed_output image | |
lpe | |