ZX Spectrum Z80 assembly, 32, 30 Bytes
org 8000h
red: equ 16
white: equ 120
blue: equ 8
start:
ld c,16 ;height
ld e,8 ; blue/offset/counter
ld hl,5800h
sheldon:
ld b,e ;counter
fun:
ld (hl),e ;blue
inc hl
djnz fun
ld b,e ;counter
with:
ld (hl),white
inc hl
djnz with
ld b,e ;counter
flags:
ld (hl),red
inc hl
djnz flags
ld d,b ;e holds offset
add hl,de
dec c
jr nz,sheldon
ret
end
30 bytes
output is 248 pixels wide =192 pixels wide
and 168 pixels high =128 pixels high
edit 1: removed preload of de with two colours,shorter to directly load (hl):saves 1 byte
By not using "de" it can now transfer values instead of "a":saves 1 byte