これができるようになった。
HL9>casm 1
HL9>AWin *w = aOpenWin(256, 256, "gradation"); c=0; [y=0:<256] { [x=0:<256] { aSetPix(w, x, y, c); c += 256; }}
LdPtrImm(P02, "gradation");
LdImm32(R00, 256)
LdImm32(R01, 256)
ApiOpenWinReg32(P03, R01, R00, P02);
CpyPtr(P04, P03);
LdImm32(R02, 0);
LdImm32(R03, 0);
CmpJmpGrtEquImm32(R03, 256, 2);
Label(3);
LdImm32(R04, 0);
CmpJmpGrtEquImm32(R04, 256, 4);
Label(5);
ApiSetPix32(P04, R04, R03, R02);
AddLngImm32(R02, R02, 256);
Label(6);
AddShtImm32(R04, 1);
CmpJmpLesThnImm32(R04, 256, 5);
Label(4);
Label(7);
AddShtImm32(R03, 1);
CmpJmpLesThnImm32(R03, 256, 3);
Label(2);
End();