view 3rdparty/customboots/boisy/testmul.a @ 2855:e126b9acab32 lwtools-port

rules.mak: Do not hardcode path for "echo" It is basically the only tool with full path here and I don't see any reason for it. We don't use special echo options that would fail on the shell built-in echo. Also don't hardcode path for losetup. sudo should make sure you have the relevant location in your path, and that the path is sanitized, otherwise your sudo setup is broken.
author Tormod Volden <debian.tormod@gmail.com>
date Sat, 13 Jul 2013 11:30:31 +0200
parents 6bc8200fd0ba
children
line wrap: on
line source

tylg           set       $01     Prgrm+Objct
atrv           set       $80+rev ReEnt+rev
rev            set       $00
edition        set       5

               psect     testmul_a,tylg,atrv,edition,200,start

               vsect
multiplicand   rmb       1
multiplier     rmb       1
               endsect

* capture two parameters
start          clr       multiplicand,u
               clr       multiplier,u

* if no params, just go straight to multiplication
               lda       ,x
               cmpa      #C$CR
               beq       go
               
* get first number
               lbsr      DEC_BIN
               stb       multiplicand,u
               leax      ,y
               lbsr      TO_NON_SP

* if no second number, go straight to multiplication
               cmpb      #C$CR
               beq       go
               lbsr      DEC_BIN
               stb       multiplier,u

go               
               orcc      #IntMasks
top               
               ldd       multiplicand,u
               mul
               bra       top

 
               endsect