NEW
  AUTO 3,1
				.LIST OFF	
*--------------------------------------
* A = Type, X = OP
*--------------------------------------
CSH.BOP.EXEC	jmp (J.CSH.BOPS,x)
*--------------------------------------
CSH.BOPS.ADD	asl
				tax
				jmp (J.CSH.BOPS.ADDt,x)

CSH.BOPS.ADDi8
CSH.BOPS.ADDu8	clc
				>PULLA
				adc (pStack)
				sta (pStack)
				clc
				rts

CSH.BOPS.ADDi16 
CSH.BOPS.ADDu16 clc
				ldy #1
				>PULLA
				adc (pStack),y
				sta (pStack),y
				>PULLA
				adc (pStack),y
				sta (pStack),y
				clc
				rts
CSH.BOPS.ADDi32
CSH.BOPS.ADDu32 >FPU ADD32
				clc
				rts

CSH.BOPS.ADDf	>FPU FADD
				clc
				rts
*--------------------------------------
CSH.BOPS.SUB	asl
				tax
				jmp (J.CSH.BOPS.SUBt,x)

CSH.BOPS.SUBi8
CSH.BOPS.SUBu8	sec
				ldy #1
				lda (pStack),y
				sbc (pStack)
				sta (pStack),y
				inc pStack
				clc
				rts

CSH.BOPS.SUBi16 
CSH.BOPS.SUBu16 sec
				ldy #2
				lda (pStack),y
				sbc (pStack)
				sta (pStack),y
				iny
				lda (pStack),y
				ldy #1
				sbc (pStack),y
				inc pStack
				inc pStack
				sta (pStack),y
				clc
				rts
CSH.BOPS.SUBi32
CSH.BOPS.SUBu32 >FPU SUB32
				clc
				rts

CSH.BOPS.SUBf	>FPU FSUB
				clc
				rts	
*--------------------------------------
CSH.BOPS.MUL	cmp #CSH.T.FLOAT
				beq .8

				>FPU MUL32
				
				
				
				
				clc
				rts

.8				>FPU FMULT
				clc
				rts
*--------------------------------------
CSH.BOPS.DIV	cmp #CSH.T.FLOAT
				beq .8

				clc
				rts

.8				>FPU FDIV
				clc
				rts
*--------------------------------------
CSH.BOPS.MOD	clc
				rts
*--------------------------------------
CSH.BOPS.SHL	asl
				tax
				jmp (J.CSH.BOPS.SHLt,x)
				
CSH.BOPS.SHL8	lda (pStack)
				tax
				beq .8
				
				ldy #1
				lda (pStack),y

.1				asl
				dex
				bne .1
				
				sta (pStack),y
				
.8				inc pStack
				clc
				rts
				
CSH.BOPS.SHL16	lda (pStack)
				tax
				beq .8
				
				ldy #2
				lda (pStack),y

				iny

.1				asl
				pha
				
				lda (pStack),y
				rol
				sta (pStack),y
				pla
				dex
				bne .1
				
				dey
				sta (pStack),y
				
.8				inc pStack
				inc pStack
				clc
				rts
				
CSH.BOPS.SHL32	lda (pStack)
				tax
				beq .8
				
				ldy #4
				lda (pStack),y

.1				asl
				pha
				
				ldy #5
				lda (pStack),y
				rol
				sta (pStack),y
				iny
				lda (pStack),y
				rol
				sta (pStack),y
				iny
				lda (pStack),y
				rol
				sta (pStack),y
				pla
				dex
				bne .1

				ldy	#4
				sta (pStack),y
				
.8				inc pStack
				inc pStack
				inc pStack
				inc pStack
				clc
				rts	
*--------------------------------------
CSH.BOPS.SHR
CSH.BOPS.L
CSH.BOPS.G
CSH.BOPS.LE
CSH.BOPS.GE
CSH.BOPS.EQ
CSH.BOPS.NE
CSH.BOPS.AND
CSH.BOPS.OR
CSH.BOPS.EOR
CSH.BOPS.LAND
CSH.BOPS.LOR


				clc
				rts
*--------------------------------------
EXEC.log		>FPU LOG
				clc
				rts
*--------------------------------------
EXEC.sqr		>FPU SQR
				clc
				rts
*--------------------------------------
EXEC.exp		>FPU EXP
				clc
				rts
*--------------------------------------
EXEC.cos		>FPU COS
				clc
				rts
*--------------------------------------
EXEC.sin		>FPU SIN
				clc
				rts
*--------------------------------------
EXEC.tan		>FPU TAN
				clc
				rts
*--------------------------------------
EXEC.atan		>FPU ATAN
				clc
				rts
*--------------------------------------
EXEC.getchar	>SYSCALL getchar
				>PUSHA
				rts
*--------------------------------------
EXEC.puts		>PULLYA
				>SYSCALL puts
				>PUSHYA
				rts
*--------------------------------------
EXEC.printf		>SYSCALL printf
				>PUSHYA
				rts
*--------------------------------------
EXEC.execl		>SYSCALL execl
				>PUSHYA
				rts
*--------------------------------------
EXEC.putenv		>SYSCALL putenv
				>PUSHYA
				rts
*--------------------------------------
EXEC.setenv		>SYSCALL setenv
				>PUSHYA
				rts
*--------------------------------------
EXEC.getenv		>SYSCALL getenv
				>PUSHYA
				rts
*--------------------------------------
EXEC.unsetenv	>SYSCALL unsetenv
				>PUSHYA
				rts
*--------------------------------------
EXEC.MD5		>SYSCALL MD5
				rts
*--------------------------------------
EXEC.malloc		>PULLYA
				>SYSCALL getmem
				>PUSHYA
				rts
*--------------------------------------
MAN
SAVE USR/SRC/BIN/CSH.S.EXEC
LOAD USR/SRC/BIN/CSH.S
ASM
