rendered paste bodyDATA;
message:
db 'Hello World!',0;
alloc col1,000999;
col2:
db 000999;
alloc ON,0;
WriteString: //ESI - String pointer, EDX - Param
mov eax,65536;
AWriteLoop:
cmp #esi,0; //Terminate on char 0
je AEnd;
mov #eax,#esi; //Output char
inc eax;
cmp ON,1;
je RED;
mov #eax,col1; //Output char param
inc eax;
inc esi;
inc ON;
jmp ENDLOO;
RED:
mov #eax,col2; //Output char param
inc eax;
inc esi;
dec ON;
ENDLOO:
jmp AWriteLoop;
AEnd:
ret //Return from call
CODE;
mov esi,message;
mov edx,000999; //White foreground on black background
call WriteString;