new version for .o
This commit is contained in:
		
							parent
							
								
									9cd6325ee1
								
							
						
					
					
						commit
						1ac26f9b67
					
				
					 44 changed files with 261 additions and 42 deletions
				
			
		|  | @ -1,4 +1,4 @@ | |||
| tail_em.a | ||||
| libem_s.a | ||||
| aaru.s | ||||
| aar.s | ||||
| aar2.s | ||||
|  |  | |||
|  | @ -1,17 +1,29 @@ | |||
| # $Header$
 | ||||
| install: | ||||
| 	../../install tail_em.a tail_em | ||||
| 	../../install tail.s end_em | ||||
| MACH=z80 | ||||
| all:		libem_o.a end.o | ||||
| 
 | ||||
| cmp: | ||||
| 	-../../compare tail_em.a tail_em | ||||
| 	-../../compare tail.s end_em | ||||
| install: 	all | ||||
| 		../../install end.o end_em | ||||
| 		../../install libem_o.a tail_em | ||||
| 
 | ||||
| clean : | ||||
| 
 | ||||
| cmp:		all | ||||
| 		-../../compare end.o end_em | ||||
| 		-../../compare libem_o.a tail_em | ||||
| 
 | ||||
| libem_o.a:	libem_s.a | ||||
| 		ASAR=aal ; export ASAR ;\
 | ||||
| 		march . libem_o.a | ||||
| 
 | ||||
| end.o:		end.s | ||||
| 		$(MACH) -I../../../h -c end.s | ||||
| 
 | ||||
| clean: | ||||
| 		rm -f *.o libem_o.a | ||||
| 
 | ||||
| opr : | ||||
| 	make pr | opr | ||||
| 		make pr | opr | ||||
| 
 | ||||
| pr: | ||||
| 	@arch pv tail_em.a | pr -h `pwd`/tail_em.a | ||||
| 	@pr `pwd`/tail.s | ||||
| 		@pr `pwd`/end.s | ||||
| 		@arch pv libem_s.a | pr -h `pwd`/libem_s.a | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .aar | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| ! use .mli2 | ||||
| 
 | ||||
| ! 2-byte descriptor elements | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .aar2 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! special case aar: element size = 2 (statically known) | ||||
| ! parameters: | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .aaru | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! AAR NOT DEFINED | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .and | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! auxiliary size 'and' | ||||
| ! parameters: | ||||
|  |  | |||
|  | @ -1,4 +1,10 @@ | |||
| .define .cii | ||||
| .define .cuu | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! cii: convert integer to integer | ||||
| ! parameters: | ||||
|  | @ -107,7 +113,6 @@ | |||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| .define .cuu | ||||
| 
 | ||||
| ! cuu: convert unsigned to unsigned | ||||
| ! parameters: | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .cms | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! any size sets | ||||
| ! parameters: | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .cmu | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! parameters: | ||||
| !   hl   :  size (#bytes) | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .cmu4 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! 4 byte cmu and cmi routine | ||||
| ! parameters: | ||||
|  | @ -56,5 +61,5 @@ | |||
| 	inc hl | ||||
| 	ld sp,hl | ||||
| 	jp (ix) | ||||
| .data | ||||
| savesp: .word 0 | ||||
| .sect .data | ||||
| savesp: .data2 0 | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .csa | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! this is not a subroutine, but just a | ||||
| ! piece of code that computes the jump- | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .csb | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! this is not a subroutine, but just a | ||||
| ! piece of code that computes the jump- | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .dvi2 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! 16-bit signed division | ||||
| ! parameters: | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .dvi4 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! 4-byte divide routine for z80 | ||||
| ! parameters: | ||||
|  | @ -77,9 +82,9 @@ | |||
| 	push bc | ||||
| 	push de | ||||
| 	jp (ix) | ||||
| .data | ||||
| 	.flag1: .byte 0
 | ||||
| 	.flag2: .byte 0
 | ||||
| 	retaddr:.word 0
 | ||||
| 	.savebc: .word 0
 | ||||
| 	.savede: .word 0
 | ||||
| .sect .data | ||||
| 	.flag1: .data1 0
 | ||||
| 	.flag2: .data1 0
 | ||||
| 	retaddr:.data2 0
 | ||||
| 	.savebc: .data2 0
 | ||||
| 	.savede: .data2 0
 | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .dvu2 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! 16-bit divide | ||||
| ! parameters: | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .dvu4 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! 4-byte divide routine for z80 | ||||
| ! parameters: | ||||
|  | @ -129,9 +134,9 @@ | |||
| 	ld hl,(.retaddr) | ||||
| 	jp (hl)		! return | ||||
| 
 | ||||
| .data | ||||
| .flag:		.byte 0
 | ||||
| .low:		.word 0
 | ||||
| .iysave:	.word 0
 | ||||
| .retaddr:	.word 0
 | ||||
| .result:	.word 0
 | ||||
| .sect .data | ||||
| .flag:		.data1 0
 | ||||
| .low:		.data2 0
 | ||||
| .iysave:	.data2 0
 | ||||
| .retaddr:	.data2 0
 | ||||
| .result:	.data2 0
 | ||||
|  |  | |||
|  | @ -1,15 +1,17 @@ | |||
| .sect .text; .sect .rom; .sect .data; .sect .bss
 | ||||
| .define	endtext,enddata,endbss | ||||
| .define _end,_etext,_edata | ||||
| 
 | ||||
| 	.text | ||||
|         ! $Header$ | ||||
| 	.sect .text | ||||
| endtext: | ||||
| _etext: | ||||
| 	.align 2
 | ||||
| 	.data | ||||
| 	.sect .data | ||||
| enddata: | ||||
| _edata: | ||||
| 	.align 2
 | ||||
| 	.bss | ||||
| .sect .endsect | ||||
| _end: | ||||
| endbss: | ||||
| 	.align 2
 | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .exg | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| .exg:	 | ||||
| 	pop ix | ||||
| 	pop de | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .gto | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| .gto: | ||||
| 	ld e,(hl) | ||||
|  |  | |||
|  | @ -1,3 +1,8 @@ | |||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| loop = 100 | ||||
| dvi4: | ||||
| 	xor a | ||||
|  | @ -57,6 +62,6 @@ dvi4: | |||
| 	push hl | ||||
| 	push de | ||||
| 	jp (iy) | ||||
| .data | ||||
| 	.flag1: .byte 0
 | ||||
| 	.flag2: .byte 0
 | ||||
| .sect .data | ||||
| 	.flag1: .data1 0
 | ||||
| 	.flag2: .data1 0
 | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .inn | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| ! use .unimpld | ||||
| 
 | ||||
| ! any size sets | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .ior | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! auxiliary size 'ior' | ||||
| ! parameters: | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .lar | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| ! use .mli2 | ||||
| 
 | ||||
| ! 2-byte descriptor elements | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .lar2 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! special case lar: element size = 2 (statically known) | ||||
| ! parameters: | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .laru | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! LAR NOT DEFINED | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .los | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .mli2 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! 16 bit multiply | ||||
| ! parameters: | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .mli4 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! 32-bit multiply routine for z80 | ||||
| ! parameters: | ||||
|  | @ -70,6 +75,6 @@ | |||
| 			! on stack!  put return address in hl | ||||
| 	push ix		! least sign. 2 bytes of result | ||||
| 	jp (hl)		! return | ||||
| .data | ||||
| .flag:  .byte 0
 | ||||
| .sect .data | ||||
| .flag:  .data1 0
 | ||||
| .mplier: .space 4
 | ||||
|  |  | |||
|  | @ -1,6 +1,11 @@ | |||
| 
 | ||||
| 
 | ||||
| .define .nop | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ! NOP | ||||
| ! changed into output routine to print linenumber | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define outdec
 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| ! output contents of HL as a sequence | ||||
| ! of decimal digits | ||||
| outdec: | ||||
|  | @ -47,7 +52,7 @@ convert: | |||
| 	pop	bc | ||||
| 	ret | ||||
| table: | ||||
| 	.short	10000
 | ||||
| 	.short	1000
 | ||||
| 	.short	100
 | ||||
| 	.short	10
 | ||||
| 	.data2	10000
 | ||||
| 	.data2	1000
 | ||||
| 	.data2	100
 | ||||
| 	.data2	10
 | ||||
|  |  | |||
|  | @ -1,6 +1,11 @@ | |||
| 
 | ||||
| 
 | ||||
| .define	pstrng
 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| 
 | ||||
| ! print a string of characters to the console | ||||
| ! entry: DE points to string | ||||
| !	 string terminator is 0x00 | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .rck | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| .rck: | ||||
| 	pop bc | ||||
| 	pop ix | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .rmi2 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! 16-bit signed remainder | ||||
| ! parameters: | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .sar | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| ! use .mli2 | ||||
| ! use .trp.z | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .sar2 | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! special case sar: element size = 2 (statically known) | ||||
| ! parameters: | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .saru | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! SAR NOT DEFINED | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .sdf | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! store double offsetted | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .sdl | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! store double local at any offset | ||||
| ! parameters: | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .set | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| ! use .unimpld | ||||
| 
 | ||||
| ! any size sets | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .strhp | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| .strhp: | ||||
| 	pop ix | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .sts | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| ! use trp.z | ||||
| 
 | ||||
| ! object size given by 2-byte integer on | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .trp.z | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! changed into output routine to print errornumber | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define unimpld, e.mon, e.rck, .trp.z, .unimpld | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| .unimpld: | ||||
| unimpld:		! used in dispatch table to | ||||
|  |  | |||
|  | @ -1,4 +1,9 @@ | |||
| .define .xor | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| .sect .text | ||||
| 
 | ||||
| ! auxiliary size 'xor' | ||||
| ! parameters: | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue