RosettaCodeData/Task/Bitmap-Histogram/Vedit-macro-language/bitmap-histogram.vedit
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

10 lines
399 B
Text

:HISTOGRAM:
#30 = Buf_Free // #30 = buffer to store histogram data
for (#9=0; #9<256; #9++) {
Out_Reg(21) TC(#9) Out_Reg(Clear) // @21 = intensity value to be counted
Buf_Switch(#15) // switch to image buffer
#8 = Search(@21, CASE+BEGIN+ALL+NOERR) // count intensity values
Buf_Switch(#30) // switch to histogram buffer
Num_Ins(#8, FILL) // store count
}
Return