|
- /* mltest.c - prove calling machine code from Power C, one marked step at a time.
- * Whatever is left on screen when it hangs is the last step that worked. */
-
- char txt[8];
- char rts[4];
-
- main()
- {
- char *p;
- char a, x, y;
-
- p = (char *) 0x0400;
- p[0] = 1; /* A: main started */
-
- rts[0] = 96; /* RTS */
- a = 0;
- x = 0;
- y = 0;
- p[1] = 2; /* B: about to sys() a bare RTS */
- for (;;) { }
- sys(15, (unsigned) rts, &a, &x, &y);
- p[2] = 3; /* C: sys + array address work */
-
- txt[0] = 72;
- txt[1] = 69;
- txt[2] = 76;
- txt[3] = 76;
- txt[4] = 79;
- mlrow((unsigned) txt, 5, 1104, 2, 0);
- p[3] = 4; /* D: the real routine came back */
- for (;;) { }
- }
|