; Math lib, inspired by neoman :>

; ! ! ! M U L T I P L I C A T I O N ; ) ! ! ! !

Multiply macro reg1, reg2, lbljmp ; result will be in reg2!
        lsl.w #2, \reg2
        move.l #\lbljmp, -(sp)
        jmp (MulTable, \reg2.w)
        endm

MulTable:
        dc.l Mul0, Mul1, Mul2, Mul3, Mul4, Mul5, Mul6, Mul7, Mul8, Mul9
        dc.l Mul10, Mul11, Mul12, Mul13, Mul14, Mul15, Mul16, Mul17, Mul18, Mul19
        dc.l Mul20, Mul21, Mul22, Mul23, Mul24, Mul25, Mul26, Mul27, Mul28, Mul29
        dc.l Mul30, Mul31, Mul32, Mul33, Mul34, Mul35, Mul36, Mul37, Mul38, Mul39
        dc.l Mul40, Mul41, Mul42, Mul43, Mul44, Mul45, Mul46, Mul47, Mul48, Mul49
        dc.l Mul50, Mul51, Mul52, Mul53, Mul54, Mul55, Mul56, Mul57, Mul58, Mul59
        dc.l Mul60, Mul61, Mul62, Mul63, Mul64, Mul65, Mul66, Mul67, Mul68, Mul69
        dc.l Mul70, Mul71, Mul72, Mul73, Mul74, Mul75, Mul76, Mul77, Mul78, Mul79
        dc.l Mul80, Mul81, Mul82, Mul83, Mul84, Mul85, Mul86, Mul87, Mul88, Mul89
        dc.l Mul90, Mul91, Mul92, Mul93, Mul94, Mul95, Mul96, Mul97, Mul98, Mul99
        dc.l Mul100, Mul101, Mul102, Mul103, Mul104, Mul105, Mul106, Mul107, Mul108, Mul109
        dc.l Mul110, Mul111, Mul112, Mul113, Mul114, Mul115, Mul116, Mul117, Mul118, Mul119
        dc.l Mul120, Mul121, Mul122, Mul123, Mul124, Mul125, Mul126, Mul127, Mul128, Mul129
        dc.l Mul130, Mul131, Mul132, Mul133, Mul134, Mul135, Mul136, Mul137, Mul138, Mul139
        dc.l Mul140, Mul141, Mul142, Mul143, Mul144, Mul145, Mul146, Mul147, Mul148, Mul149
        dc.l Mul150, Mul151, Mul152, Mul153, Mul154, Mul155, Mul156, Mul157, Mul158, Mul159
        dc.l Mul160, Mul161, Mul162, Mul163, Mul164, Mul165, Mul166, Mul167, Mul168, Mul169
        dc.l Mul170, Mul171, Mul172, Mul173, Mul174, Mul175, Mul176, Mul177, Mul178, Mul179
        dc.l Mul180, Mul181, Mul182, Mul183, Mul184, Mul185, Mul186, Mul187, Mul188, Mul189
        dc.l Mul190, Mul191, Mul192, Mul193, Mul194, Mul195, Mul196, Mul197, Mul198, Mul199
        dc.l Mul200, Mul201, Mul202, Mul203, Mul204, Mul205, Mul206, Mul207, Mul208, Mul209
        dc.l Mul210, Mul211, Mul212, Mul213, Mul214, Mul215, Mul216, Mul217, Mul218, Mul219
        dc.l Mul220, Mul221, Mul222, Mul223, Mul224, Mul225, Mul226, Mul227, Mul228, Mul229
        dc.l Mul230, Mul231, Mul232, Mul233, Mul234, Mul235, Mul236, Mul237, Mul238, Mul239
        dc.l Mul240, Mul241, Mul242, Mul243, Mul244, Mul245, Mul246, Mul247, Mul248, Mul249
        dc.l Mul250, Mul251, Mul252, Mul253, Mul254, Mul255, Mul256

Mul0:
        rts
Mul1: 
        move.l \reg1, \reg2
        