OK, mentioned elsewhere I like to learn by example. So, could some assembler guru demonstrate to the assembled (joke. Geddit?) newbs viewing, how the following (I'm particularly interested in the loops) would code out?
(and I appreciate this is trivial and could gain any number of performance improvements by things such as backward loops etc. If that's all you see then you've missed the point.)
(and I appreciate this is trivial and could gain any number of performance improvements by things such as backward loops etc. If that's all you see then you've missed the point.)
Code:
FUNCTION PBMAIN () AS LONG c&=0 FOR a&=1 TO 10 FOR b&=a&+1 TO 11 c&=c+a&+b& NEXT NEXT PRINT c& WAITKEY$ END FUNCTION
Comment