initial
[fpgammix.git] / workloads / emulation / test-divu2.mms
blobd015b87f96953fb1a39cce49090483b8eab72e54
1                 LOC     #600000000
3 Traphandler     PUSHJ   255,1F
4                 PUT     rJ,$255
5                 SETL    $255,0
6                 RESUME  1
8 Main            SETML   $0,#e300
9                 SETMH   $1,6
10                 STTU    $0,$1,8
11                 SETMH   $255,6
12                 PUT     rT,$255
13                 SETL    $254,1729
14                 SETL    $253,19
15                 DIVU    $255,$254,$253
16                 INCL    $255,#1234
17                 TRAP    0,0,0
20 1H              GET     $0,rXX
21                 SRU     $1,$0,56
22                 CMP     $1,$1,#02
23                 BNZ     $1,2F
25                 SRU     $0,$0,24
26                 AND     $1,$0,#FC
27                 CMP     $1,$1,#1C
28                 BZ      $1,3F
30 % Unknown trap
31                 POP     0,0
33 % Ordinary trap ("system call") handling
34 2H              SWYM
35                 POP     0,0
38 % Div[u][i] emulation
39 3H              GET     $0,rYY
40                 GET     $1,rZZ
41                 ADD     $0,$0,$1   % This should be division emulation but ...
42                 PUT     rZZ,$0
43                 POP     0,0