The children inherit from their parent class

Posted by s on Nov. 15, 2008, 3:16 p.m.

Rewriting datastructs to save on memory passing. No more list of lists, we now have a list of nodes which inherit from the list

Been working with that language that is so esoteric that they only give one a large number of goto variants. Working off of a return a+b function, I modified it to compute the factorial of a(and modified it to not take a b)

fac: ;That's right, we use a feathered goto for function calls

enter ;A nice coverup for stack play

mov eax,1 ;Start multiplication at 1

mov ecx,[ebp+8] ;Store argument in counter

@@: ;Anonymous labels,because they're everywhere

mul ecx ;imul eax, ecx ;I should make mul(a,b)->imul(a,b)

loop @b ;While ECX–>0 (b=back, ASM is so full of labels that assemblers have anonymous labels)

leave ;Fix up enter's play

ret 4 ;Pretty much a COMEFROM (EAX=return)

Been watching the OpenMIT on Language Design/Compiler Design and they've started tinkering with ASM so figured that some looking into was in order

Comments