• R/O
  • HTTP
  • SSH
  • HTTPS

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A complete (I think) set of code generator macros to generate published op-codes


File Info

Révision b281f65ed7aeceaaf5feefa53f71dc6a4c0a99ac
Taille 1,467 octets
l'heure 2020-10-08 20:37:04
Auteur Joel Matthew Rees
Message de Log

As it survived the trip across the Mac and ocean

Content

/* Scatter test of some implicit mode ops */
/* Assigned by the author to the public domain, February 2000, Takino, Japan. */
/* joel_rees@sannet.ne.jp */
/* http://www.page.sannet.ne.jp/joel_rees */


#include "code.h"
#include <stdio.h>

int main()
{  int err;
   CODE *v1 = dap;
   CODE *v2 = dap += 4;
   CODE *s1 = dap += 4;
   CODE *s2 = dap += 16;
   CODE *f = cap;
   CODE *targ1, *targ2, *obj;

   printf("here?\n");
   v1[0] = 0x0000;
   v1[1] = 0x4321;
   v1[2] = 0x5678;
   v1[3] = 0x9012;
   v2[0] = 0x0876;
   v2[1] = 0x2345;
   v2[2] = 0x9012;
   v2[3] = 0x5489;
   strcpy((char *) s1, "hello there");
   err = genLINK(6, -30);
   err = genPUSH(CLONG, _PSH(E_An|1)|_PSH(E_An|2)|_PSH(E_An|3)
			|_PSH(E_Dn|6)|_PSH(E_Dn|7)|_PSH(E_Dn|0),
		 E_InDEC|7, 0, 0);
   err = genMOVE(CLONG, E_IMM, 0, (long) v2, E_An|2, 0, 0);
   err = genMOVE(CLONG, E_IMM, 0, (long) v2, E_An|3, 0, 0);
   err = genMOVE(CBYTE, E_IMM, 0, 0xc, E_Dn|7, 0, 0);
   err = genMOVE(CBYTE, E_IMM, 0, 0x4356, E_Dn|6, 0, 0);
   err = genNOP;
   err = genILLEGAL;
   err = genRESET;
   err = genSTOP(0xa715);
   err = genTRAP(0);
   err = genTRAP(5);
   err = genTRAP(15);
   err = genTRAP(47);
   err = genTRAPV;
   err = genPULL(CLONG, E_InINC|7, 0, 0,
		 _PUL(E_An|1)|_PUL(E_An|2)|_PUL(E_An|3)
		 |_PUL(E_Dn|6)|_PUL(E_Dn|7)|_PUL(E_Dn|0));
   err = genUNLK(6);
   err = genRTS;
   err = genRTE;
   err = genRTD(0x321);
   err = (*(PFI) f)();
   printf("what? %lx\n", err);
   return(0);
}