initial
[fpgammix.git] / regression-tests / test-div / test-div.mms
blob9c515a2655b25d0ff0d67cf2d78dda7ceaf40b9e
1 % This is almost "hello world" simple
3 % This depends on working GETA, LDOU, PUT
4 % TRAP, SETL, CMP, BZ
6         LOC     #100
8 Main    GETA    $255,FailMsg
9         GETA    $0,Numbers
10 Loop    PUT     rD,0
11         LDOU    $1,$0,0  % Quotent
12         LDOU    $2,$0,8  % Divisor
13         LDOU    $3,$0,16  % Expected result
14         LDOU    $4,$0,24  % Expected remainder
15         DIVU    $5,$1,$2
17         CMPU    $6,$5,$3
18         BNZ     $6,Done
20         GET     $5,rR
21         CMPU    $6,$5,$4
22         BNZ     $6,Done
24         ADDU    $0,$0,32
25         GETA    $1,End
26         CMP     $1,$0,$1
27         BNZ     $1,Loop
29         GETA    $255,PassMsg
31 Done    TRAP    0,Fputs,StdOut
32         TRAP    0,Halt,0
34 PassMsg BYTE    "Passed",#a,0
35 FailMsg BYTE    "Failed!",#a,0
37 Numbers OCTA    20060917
38         OCTA        1646
39         OCTA       12187
40         OCTA        1115
42         OCTA    #8000000000000000
43         OCTA    #FFFFFFFFFFFFFFFF
44         OCTA    #0
45         OCTA    #8000000000000000
47         OCTA    #8000000000000017
48         OCTA    #0
49         OCTA    #0
50         OCTA    #8000000000000017
52 End     OCTA           0