![background image](http://html2.mh-extra.com/html/racal-instruments/7064/7064_instruction-manual_3127022040.webp)
4.4 P E E K I N G A N D P O K I N G T H E 68000
The Message-Based Interface allows the user t o "poke" and "peek" words and bytes
to/from any location within the 68000's address space. T h e intent of these commands is
to allow the user to exercise
I/O
ports and circuitry. T h e adventurous Message-Based
Interface user will soon realize that programs can be "poked" uncommitted R A M or the
user global area. T h e following C program illustrates this point. I t will endlessly toggle
a selected bit of a specified I/O port. It's intended to be run from the command line of the
host system. I t "pokes" a simple loop into the beginning o f the user global area, and
selects this simple routine as the "application parser" to be repeatedly called.
#include <stdio.h>
#include <ctype.h>
extern void exit(int);
/* loop
* /
/* each elem = "Ox" + 4 hex N U L L * /
char Instrs[][6+11 =
"0x207c", / * movea.1 #<address>, a0
"" , I* upper 16 address bits * /
" , /* lower 16 address bits * /
"0x70ff", / * moveq #-1, dO ; 64K loop iters
"Ox1210", / * move.b (a0), d l * /
"0x0841", 1* bchg #<bitnum>, d l * /
"" , /* bit to toggle * /
"Ox1081", / * move.b d l , (a0) * /
"0x51c8", / * d b f dO, loop * /
"0xfff6", / * offset back to 'loop' label * /
"0x4e75", / * its * /
* 1
#define N U M _ I N S T R U C T I O N S (sizeof(Instrs)/(6+1))
void pokeNrunToggleBitCocie unsigned long addr,unsigned bitnum)
char buf[100];
int i, ud;
const unsigned long targaddr = 0x00401000L;
unsigned upper, lower;
ud = ibfind ("VXITECH");
upper = ((addr & 0xffff0000L) >> 16);
lower = ( a d d r & Ox0000ffffL);
sprintf(&Instrs(11, "Ox%.4x", upper);
sprintf(&Instrs[2], "Ox%.4x", lower);
4-11
Содержание 7064
Страница 2: ...Racal Instruments...
Страница 6: ...I 1 1 1 1 1...
Страница 21: ...I 1 I I I I I I I I I 1 1 I I I I I I...
Страница 29: ...I I I I I I I I I I I I I I I I I I I...
Страница 57: ...1 I I I I I I I I I I I I I I I I I I...
Страница 77: ...1...
Страница 111: ...0 00 0 00 tI I 4 0 0 I7 r i 6 4 7 4 7 0 T 6 0 0 7 28...
Страница 112: ......
Страница 113: ...7 30 I I I 1 I I I I I I I I I I I I I I I...
Страница 115: ...7 32...
Страница 124: ...CO 0 L5 F 4 BEAD 2 A C8 1 0 1 uF C9 01 uF T 0 1 uF 01 uF E12 0 IIIIII M I 11111 V I E M I 111111 I I I I I I N M I I...
Страница 148: ......
Страница 164: ...I I I I I I I I I I 1 I I I I I I I I...
Страница 176: ...extern char error_msg_lookup unsigned errdes endif ERROR_INCLUDE C 8...