legacy-cc

The earliest versions of the very first c compiler known to exist in the wild written by the late legend himself dmr. https://github.com/mortdeus/legacy-cc
git clone http://git.hanabi.in/repos/legacy-cc.git
Log | Files | Refs | README

cctab.s (941B)


      1 / c code tables-- set condition codes
      2 
      3 .globl	_cctab
      4 
      5 _cctab=.;.+2
      6 	20.;	rest
      7 	21.;	rest
      8 	22.;	rest
      9 	30.;	rest
     10 	31.;	rest
     11 	34.;	rest
     12 	35.;	rest
     13 	36.;	rest
     14 	37.;	rest
     15 	40.;	rest
     16 	41.;	rest
     17 	42.;	rest
     18 	43.;	rest
     19 	44.;	rest
     20 	45.;	rest
     21 	46.;	rest
     22 	47.;	rest
     23 	48.;	rest
     24 	60.;	cc60
     25 	61.;	cc60
     26 	62.;	cc60
     27 	63.;	cc60
     28 	64.;	cc60
     29 	65.;	cc60
     30 	66.;	cc60
     31 	67.;	cc60
     32 	68.;	cc60
     33 	69.;	cc60
     34 	70.;	rest
     35 	71.;	rest
     36 	72.;	rest
     37 	73.;	rest
     38 	74.;	rest
     39 	75.;	rest
     40 	76.;	rest
     41 	77.;	rest
     42 	78.;	rest
     43 	79.;	rest
     44 	80.;	rest
     45 
     46 / relationals
     47 cc60:
     48 %a,z
     49 	tstB1	A1
     50 
     51 %n*,z
     52 	F*
     53 	tstB1	#1(R)
     54 
     55 %n,z
     56 	F
     57 	tst	R
     58 
     59 %a,a
     60 	cmpBE	A1,A2
     61 
     62 %n*,a
     63 	F*
     64 	cmpBE	#1(R),A2
     65 
     66 %n,a
     67 	F
     68 	cmpB2	R,A2
     69 
     70 %n*,e*
     71 	F*
     72 	S1*
     73 	cmpBE	#1(R),#2(R1)
     74 
     75 %n*,e
     76 	F*
     77 	S1
     78 	cmpB1	#1(R),R1
     79 
     80 %n,e*
     81 	F
     82 	S1*
     83 	cmpB2	R,#2(R1)
     84 
     85 %n,e
     86 	F
     87 	S1
     88 	cmp	R,R1
     89 
     90 %n*,n*
     91 	FS*
     92 	S*
     93 	cmpBE	(sp)+,#2(R)
     94 
     95 %n*,n
     96 	FS*
     97 	S
     98 	cmpB1	*(sp)+,R
     99 
    100 %n,n*
    101 	FS
    102 	S*
    103 	cmpB2	(sp)+,#2(R)
    104 
    105 %n,n
    106 	FS
    107 	S
    108 	cmp	(sp)+,R
    109 
    110 / set codes right
    111 rest:
    112 %n,n
    113 	H
    114 
    115 .data
    116 .even
    117 .text
    118