aboutsummaryrefslogtreecommitdiff
path: root/tests/stack_machine_store/instructions.s.tcl
blob: ddc3a8e58eea9e9f36c556047467357e53616189 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env tclsh

source tclasm.tcl

### simple test - write value hDEADBEEF to address h3ABCD

## get value hDEADBEEF into r1

#                             DDDD EEEE AA
# bits 31:22 of hDEADBEEF are 1101 1110 10
_immediate im<<=b1101111010
#                             AA DDDD BBBB E
# bits 21:11 of hDEADBEEF are 10 1101 1011 1
_immediate im<<=b10110110111
#                            EEE EEEE FFFF
# bits 10:0 of hDEADBEEF are 110 1110 1111
_exchange_im im<<=b11011101111

## get address h7579A into im

#                          7777 5555 7
# bits 19:11 of h7579A are 0111 0101 0
_immediate im=b011101010
#                         777 9999 AAAA
# bits 10:0 of h7579A are 111 1001 1010
store im<<=b11110011010

## finish test
halt