new version for new assembler syntax
This commit is contained in:
		
							parent
							
								
									d899835b31
								
							
						
					
					
						commit
						433346583e
					
				
					 38 changed files with 209 additions and 31 deletions
				
			
		| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
tail_em.s.a
 | 
					libem_s.a
 | 
				
			||||||
aar.s
 | 
					aar.s
 | 
				
			||||||
blm.s
 | 
					blm.s
 | 
				
			||||||
cii.s
 | 
					cii.s
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,12 @@
 | 
				
			||||||
 | 
					all:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
install:	
 | 
					install:	
 | 
				
			||||||
		../../install head_em.s head_em
 | 
							../../install head_em.s head_em
 | 
				
			||||||
		../../install tail_em.s.a tail_em
 | 
							../../install libem_s.a tail_em
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cmp:
 | 
					cmp:
 | 
				
			||||||
		-../../compare head_em.s head_em
 | 
							-../../compare head_em.s head_em
 | 
				
			||||||
		-../../compare tail_em.s.a tail_em
 | 
							-../../compare libem_s.a tail_em
 | 
				
			||||||
 | 
					
 | 
				
			||||||
clean:
 | 
					clean:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,5 +14,5 @@ opr :
 | 
				
			||||||
	make pr | opr
 | 
						make pr | opr
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pr:
 | 
					pr:
 | 
				
			||||||
	@pr head_em.s
 | 
						@pr `pwd`/head_em.s
 | 
				
			||||||
	@arch pv tail_em.s.a | pr -h `pwd`/tail_em.s.a
 | 
						@arch pv libem_s.a | pr -h `pwd`/libem_s.a
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define aar
 | 
					.define aar
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!R1 contains description address
 | 
					!R1 contains description address
 | 
				
			||||||
!R3 contains element number
 | 
					!R3 contains element number
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define blm
 | 
					.define blm
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!size in R0
 | 
					!size in R0
 | 
				
			||||||
blm:
 | 
					blm:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define cii
 | 
					.define cii
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cii:
 | 
					cii:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define cmi
 | 
					.define cmi
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!size in R0
 | 
					!size in R0
 | 
				
			||||||
cmi:
 | 
					cmi:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define cmi4
 | 
					.define cmi4
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cmi4:
 | 
					cmi4:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define cms
 | 
					.define cms
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cms:
 | 
					cms:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define cmu
 | 
					.define cmu
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!size in R0
 | 
					!size in R0
 | 
				
			||||||
cmu:
 | 
					cmu:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define cmu4
 | 
					.define cmu4
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cmu4:
 | 
					cmu4:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define csa
 | 
					.define csa
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!R1 contains address of jump table
 | 
					!R1 contains address of jump table
 | 
				
			||||||
!R2 contains case index
 | 
					!R2 contains case index
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define csb
 | 
					.define csb
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!R1 contains address of jump table
 | 
					!R1 contains address of jump table
 | 
				
			||||||
!R2 contains case index
 | 
					!R2 contains case index
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define cuu
 | 
					.define cuu
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cuu:
 | 
					cuu:
 | 
				
			||||||
	popl	RR2, *RR14
 | 
						popl	RR2, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define dup
 | 
					.define dup
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dup:
 | 
					dup:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define dvu2
 | 
					.define dvu2
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dvu2:
 | 
					dvu2:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define dvu4
 | 
					.define dvu4
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dvu4:
 | 
					dvu4:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,14 +1,16 @@
 | 
				
			||||||
.define	endtext, enddata, endbss, _etext, _edata, _end
 | 
					.define	endtext,enddata,endbss,_etext,_edata,_end
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .end ! only for declaration of _end and endbss.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	.text
 | 
						.sect .text
 | 
				
			||||||
endtext:
 | 
					endtext:
 | 
				
			||||||
_etext:
 | 
					_etext:
 | 
				
			||||||
	.align 2
 | 
						.sect .data
 | 
				
			||||||
	.data
 | 
					 | 
				
			||||||
	.align 2
 | 
					 | 
				
			||||||
enddata:
 | 
					enddata:
 | 
				
			||||||
_edata:
 | 
					_edata:
 | 
				
			||||||
	.bss
 | 
						.sect .end
 | 
				
			||||||
	.align 2
 | 
					 | 
				
			||||||
endbss:
 | 
					 | 
				
			||||||
_end:
 | 
					_end:
 | 
				
			||||||
 | 
					endbss:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define exg
 | 
					.define exg
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!size (bytes) in R0
 | 
					!size (bytes) in R0
 | 
				
			||||||
exg:
 | 
					exg:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define gto
 | 
					.define gto
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
gto:
 | 
					gto:
 | 
				
			||||||
	pop	R3, *RR14
 | 
						pop	R3, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,11 @@
 | 
				
			||||||
.define  EXIT, F_DUM
 | 
					.define  EXIT, F_DUM
 | 
				
			||||||
.define  ERANGE, ESET, EHEAP, EILLINS, EODDZ, ECASE, EBADMON
 | 
					.define  ERANGE, ESET, EHEAP, EILLINS, EODDZ, ECASE, EBADMON
 | 
				
			||||||
.define  hol0, trppc, trpim, reghp, argv, envp
 | 
					.define  hol0, trppc, trpim, reghp, argv, envp
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EXIT	= 0
 | 
					EXIT	= 0
 | 
				
			||||||
F_DUM	= 0
 | 
					F_DUM	= 0
 | 
				
			||||||
| 
						 | 
					@ -13,8 +18,8 @@ EODDZ	= 19
 | 
				
			||||||
ECASE   = 20
 | 
					ECASE   = 20
 | 
				
			||||||
EBADMON = 25
 | 
					EBADMON = 25
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.text
 | 
					.sect .text
 | 
				
			||||||
			!clear .bss
 | 
								!clear .sect .bss
 | 
				
			||||||
	ldk	R2, $0
 | 
						ldk	R2, $0
 | 
				
			||||||
	ld	R3, $endbss
 | 
						ld	R3, $endbss
 | 
				
			||||||
	ld	R0, R3
 | 
						ld	R0, R3
 | 
				
			||||||
| 
						 | 
					@ -38,20 +43,20 @@ EBADMON = 25
 | 
				
			||||||
	ldl	RR14, $0xC00017FC
 | 
						ldl	RR14, $0xC00017FC
 | 
				
			||||||
	sc	$0
 | 
						sc	$0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.bss
 | 
					.sect .bss
 | 
				
			||||||
begbss:
 | 
					begbss:
 | 
				
			||||||
.data
 | 
					.sect .data
 | 
				
			||||||
hol0:
 | 
					hol0:
 | 
				
			||||||
	.word 0,0			! line no
 | 
						.data2 0,0			! line no
 | 
				
			||||||
	.word 0,0			! file
 | 
						.data2 0,0			! file
 | 
				
			||||||
trppc:
 | 
					trppc:
 | 
				
			||||||
	.word 0
 | 
						.data2 0
 | 
				
			||||||
trpim:
 | 
					trpim:
 | 
				
			||||||
	.word 0
 | 
						.data2 0
 | 
				
			||||||
argv:
 | 
					argv:
 | 
				
			||||||
envp:
 | 
					envp:
 | 
				
			||||||
	.word 1f
 | 
						.data2 1f
 | 
				
			||||||
	.word 0
 | 
						.data2 0
 | 
				
			||||||
1:	.asciz	"program"
 | 
					1:	.asciz	"program"
 | 
				
			||||||
reghp:
 | 
					reghp:
 | 
				
			||||||
	.word endbss
 | 
						.data2 endbss
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define inn
 | 
					.define inn
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!bitnr in R1
 | 
					!bitnr in R1
 | 
				
			||||||
!size (bytes) in R2
 | 
					!size (bytes) in R2
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define lar
 | 
					.define lar
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!R1 contains description address
 | 
					!R1 contains description address
 | 
				
			||||||
!R3 contains element number
 | 
					!R3 contains element number
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define los2
 | 
					.define los2
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
los2:
 | 
					los2:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define mon
 | 
					.define mon
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
mon:
 | 
					mon:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,14 @@
 | 
				
			||||||
.define noop
 | 
					.define noop
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
noop:
 | 
					noop:
 | 
				
			||||||
	push	*RR14, hol0
 | 
						push	*RR14, hol0
 | 
				
			||||||
	push	*RR14, $fmt
 | 
						push	*RR14, $fmt
 | 
				
			||||||
	calr	prf
 | 
						calr	prf
 | 
				
			||||||
	ret
 | 
						ret
 | 
				
			||||||
.data
 | 
					.sect .data
 | 
				
			||||||
fmt:	.asciz	"test %d\n"
 | 
					fmt:	.asciz	"test %d\n"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define prf
 | 
					.define prf
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
prf:
 | 
					prf:
 | 
				
			||||||
	ld	R0, hol0+4	!pointer to filename
 | 
						ld	R0, hol0+4	!pointer to filename
 | 
				
			||||||
| 
						 | 
					@ -29,8 +34,8 @@ prf:
 | 
				
			||||||
	ret
 | 
						ret
 | 
				
			||||||
1:	ld	R0, $name
 | 
					1:	ld	R0, $name
 | 
				
			||||||
	jr	2b
 | 
						jr	2b
 | 
				
			||||||
.data
 | 
					.sect .data
 | 
				
			||||||
fmt1:	.asciz	"%s, sp = %x, line %d:\n"
 | 
					fmt1:	.asciz	"%s, sp = %x, line %d:\n"
 | 
				
			||||||
name:	.asciz	"_unknown file_"
 | 
					name:	.asciz	"_unknown file_"
 | 
				
			||||||
saveprf:
 | 
					saveprf:
 | 
				
			||||||
	.long 0
 | 
						.data4 0
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define printf
 | 
					.define printf
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
printf:
 | 
					printf:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					@ -77,6 +82,6 @@ printn:
 | 
				
			||||||
	inc	R3
 | 
						inc	R3
 | 
				
			||||||
	ret
 | 
						ret
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.data
 | 
					.sect .data
 | 
				
			||||||
buff:
 | 
					buff:
 | 
				
			||||||
	.space 256
 | 
						.space 256
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define rck
 | 
					.define rck
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rck:
 | 
					rck:
 | 
				
			||||||
	ld	R0, RR14($4)
 | 
						ld	R0, RR14($4)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define rmu2
 | 
					.define rmu2
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rmu2:
 | 
					rmu2:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define rmu4
 | 
					.define rmu4
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rmu4:
 | 
					rmu4:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define sar
 | 
					.define sar
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!R1 contains description address
 | 
					!R1 contains description address
 | 
				
			||||||
!R3 contains element number
 | 
					!R3 contains element number
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,13 @@
 | 
				
			||||||
.define saveret
 | 
					.define saveret
 | 
				
			||||||
.define savereg
 | 
					.define savereg
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.data
 | 
					.sect .data
 | 
				
			||||||
saveret:
 | 
					saveret:
 | 
				
			||||||
	.long 0
 | 
						.data4 0
 | 
				
			||||||
savereg:
 | 
					savereg:
 | 
				
			||||||
	.space 20
 | 
						.space 20
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define strhp
 | 
					.define strhp
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
strhp:
 | 
					strhp:
 | 
				
			||||||
	popl	RR2, *RR14
 | 
						popl	RR2, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define sts2
 | 
					.define sts2
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sts2:
 | 
					sts2:
 | 
				
			||||||
	popl	saveret, *RR14
 | 
						popl	saveret, *RR14
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define trp, fatal
 | 
					.define trp, fatal
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fatal:
 | 
					fatal:
 | 
				
			||||||
	calr	trp
 | 
						calr	trp
 | 
				
			||||||
| 
						 | 
					@ -34,5 +39,5 @@ trp:
 | 
				
			||||||
3:	push	*RR14, $err
 | 
					3:	push	*RR14, $err
 | 
				
			||||||
	calr	printf
 | 
						calr	printf
 | 
				
			||||||
	sc	$EXIT
 | 
						sc	$EXIT
 | 
				
			||||||
.data
 | 
					.sect .data
 | 
				
			||||||
err:	.asciz	"trap error %d\n"
 | 
					err:	.asciz	"trap error %d\n"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define unknown
 | 
					.define unknown
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
unknown:
 | 
					unknown:
 | 
				
			||||||
	push	*RR14, $EODDZ
 | 
						push	*RR14, $EODDZ
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
.define xset
 | 
					.define xset
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					.sect .rom
 | 
				
			||||||
 | 
					.sect .data
 | 
				
			||||||
 | 
					.sect .bss
 | 
				
			||||||
 | 
					.sect .text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!bitnr in R1
 | 
					!bitnr in R1
 | 
				
			||||||
!size (bytes) in R0
 | 
					!size (bytes) in R0
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue