program tutorial1;
@use "system/system"
var

@export "images/image1.flf" "images/image1.bin" 256 2	
	img : incbin("images/image1.bin");
	
// docs: 	
//	https://files-pk--fpga-ru.translate.goog/storage/gid/html/emu_doc.html?_x_tr_sch=http&_x_tr_sl=ru&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp
// https://git.sr.ht/~adlpr/bk0010-01-programming/tree/main/item/bk0010-01-programming.md
begin
	System::Init();
	asm("
	

;	mov #0, r0
;	emt 40
;	MOV #405, R0
;	EMT 52
;	emt 12


;   mov #100000, r1
;    mov #20000,r3

;3:  clr (r1)+
;	sob r3,3

    mov #img, r1
    mov #40000,r2
    mov #20000,r3
l1:
	mov (r1)+,(r2)+
	sob r3,l1

	movb #377,r1
;	MOV #0, 177664
;	MOVb r1, 050
;	movb r1, 040
;	movb r1, 047
;	movb r1, 042
;	mov #377,177716 
1:
;	br 1

	mov #40000, r1
	mov #1000,r2
2: 	
	incb (r1)
	add #1,r1
	sob r2,2
	br 1
	

	
	");
	
	
end.