Skip to content

Commit 2064116

Browse files
committed
Use #pragma in examples to lower initial learning curve.
Signed-off-by: Pavel Pisa <[email protected]>
1 parent 679ffb0 commit 2064116

File tree

4 files changed

+33
-1
lines changed

4 files changed

+33
-1
lines changed

qtmips_gui/samples/cop0-test-ia.S

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Directives to make interresting windows visible
2+
#pragma qtmips show terminal
3+
#pragma qtmips show registers
4+
#pragma qtmips show cop0dock
5+
#pragma qtmips show memory
6+
17
.set SERIAL_PORT_BASE, 0xffffc000
28

39
.set SERP_RX_ST_REG_o, 0x00
@@ -12,7 +18,6 @@
1218

1319
.set SERP_TX_DATA_REG_o, 0x0c
1420

15-
1621
.globl _start
1722
.set noat
1823
.set noreorder
@@ -72,3 +77,6 @@ rx_irq:
7277
eret
7378

7479
.end _start
80+
81+
// if whole source compile is OK the switch to core tab
82+
#pragma qtmips tab core

qtmips_gui/samples/simple-lw-sw-ia.S

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Directives to make interresting windows visible
2+
#pragma qtmips show registers
3+
#pragma qtmips show memory
4+
15
.globl _start
26
.set noat
37
.set noreorder
@@ -24,3 +28,6 @@ src_val:
2428
.word 0x12345678
2529
dst_val:
2630
.word 0
31+
32+
// Specify location to show in memory window
33+
#pragma qtmips focus memory src_val

qtmips_gui/samples/template-os.S

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
// work: http://www.pikron.com/
1111
// license: public domain
1212

13+
// Directives to make interresting windows visible
14+
#pragma qtmips show terminal
15+
#pragma qtmips show registers
16+
#pragma qtmips show cop0dock
17+
#pragma qtmips show memory
18+
1319
.globl _start
1420
.globl __start
1521
.set noreorder
@@ -112,3 +118,6 @@ data_1: .word 1, 2, 3, 4
112118

113119
text_1: .ascii "Hello word.\n" // store ASCII text, no termination
114120
text_1_e:
121+
122+
// if whole source compile is OK the switch to core tab
123+
#pragma qtmips tab core

qtmips_gui/samples/template.S

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
// work: http://www.pikron.com/
1111
// license: public domain
1212

13+
// Directives to make interresting windows visible
14+
#pragma qtmips show terminal
15+
#pragma qtmips show registers
16+
#pragma qtmips show memory
17+
1318
.globl _start
1419
.globl __start
1520
.set noreorder
@@ -107,3 +112,6 @@ end_char: break // stop continuous execution
107112
data_1: .word 1, 2, 3, 4 // example how to fill data words
108113

109114
text_1: .asciz "Hello word.\n" // store zero terminated ASCII text
115+
116+
// if whole source compile is OK the switch to core tab
117+
#pragma qtmips tab core

0 commit comments

Comments
 (0)