|
@@ -15,17 +15,26 @@
|
15
|
15
|
*
|
16
|
16
|
*/
|
17
|
17
|
|
18
|
|
-/* Access to variables in .data16 */
|
|
18
|
+/* Access to variables in .data16 and .text16 */
|
19
|
19
|
extern char *data16;
|
|
20
|
+extern char *text16;
|
20
|
21
|
|
21
|
22
|
#define __data16( variable ) \
|
22
|
23
|
_data16_ ## variable __asm__ ( #variable ) \
|
23
|
24
|
__attribute__ (( section ( ".data16" ) ))
|
24
|
25
|
|
|
26
|
+#define __text16( variable ) \
|
|
27
|
+ _text16_ ## variable __asm__ ( #variable ) \
|
|
28
|
+ __attribute__ (( section ( ".text16" ) ))
|
|
29
|
+
|
25
|
30
|
#define __use_data16( variable ) \
|
26
|
31
|
( * ( ( typeof ( _data16_ ## variable ) * ) \
|
27
|
32
|
& ( data16 [ ( size_t ) & ( _data16_ ## variable ) ] ) ) )
|
28
|
33
|
|
|
34
|
+#define __use_text16( variable ) \
|
|
35
|
+ ( * ( ( typeof ( _text16_ ## variable ) * ) \
|
|
36
|
+ & ( text16 [ ( size_t ) & ( _text16_ ## variable ) ] ) ) )
|
|
37
|
+
|
29
|
38
|
/* Variables in librm.S, present in the normal data segment */
|
30
|
39
|
extern uint16_t rm_sp;
|
31
|
40
|
extern uint16_t rm_ss;
|