use pusha and popa instructions, and on the proper place
This commit is contained in:
		
							parent
							
								
									cd70a74d25
								
							
						
					
					
						commit
						dcde07e7a7
					
				
					 2 changed files with 5 additions and 16 deletions
				
			
		| 
						 | 
				
			
			@ -29,7 +29,6 @@ ngi.s
 | 
			
		|||
nop.s
 | 
			
		||||
print.s
 | 
			
		||||
rck.s
 | 
			
		||||
return.s
 | 
			
		||||
rmi.s
 | 
			
		||||
rmu.s
 | 
			
		||||
rol.s
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,13 +8,6 @@
 | 
			
		|||
	! May only be called with error no's <16
 | 
			
		||||
.sect .text
 | 
			
		||||
.error:
 | 
			
		||||
	push ebp
 | 
			
		||||
	push esi
 | 
			
		||||
	push edi
 | 
			
		||||
	push edx
 | 
			
		||||
	push ecx
 | 
			
		||||
	push ebx
 | 
			
		||||
	push eax
 | 
			
		||||
	mov  ecx,eax
 | 
			
		||||
	mov  ebx,1
 | 
			
		||||
	sal  ebx,cl
 | 
			
		||||
| 
						 | 
				
			
			@ -24,19 +17,16 @@
 | 
			
		|||
	jne  2f
 | 
			
		||||
	call    .trp
 | 
			
		||||
2:
 | 
			
		||||
	pop  eax
 | 
			
		||||
	pop  ebx
 | 
			
		||||
	pop  ecx
 | 
			
		||||
	pop  edx
 | 
			
		||||
	pop  edi
 | 
			
		||||
	pop  esi
 | 
			
		||||
	pop  ebp
 | 
			
		||||
	ret
 | 
			
		||||
 | 
			
		||||
.Xtrp:
 | 
			
		||||
	pusha
 | 
			
		||||
	cmp	eax,16
 | 
			
		||||
	jge	1f
 | 
			
		||||
	call	.error
 | 
			
		||||
	popa
 | 
			
		||||
	ret
 | 
			
		||||
1:
 | 
			
		||||
	jmp	.trp
 | 
			
		||||
	call	.trp
 | 
			
		||||
	popa
 | 
			
		||||
	ret
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue