;---C/C++ Ɋ֐|C^֗̕ȊTOƋ@\܂B
;---CASL2œ@\Ă݂܂B
MAIN	START
;---ʏ CALL߂gSUB1, SUB2, SUB3 Ăяo
;---sB
	CALL	SUB1; vO܂֐
	CALL	SUB2
	CALL	SUB3
; e֐ ̃AhXi܂֐|C^j擾
;  FUNCPTRḦ Ɋi[B-------
	LAD 	GR1,0
	LAD 	GR2,SUB1
	ST	GR2,FUNCPTRH,GR1
	LAD	GR1,1,GR1
	LAD	GR2,SUB2
	ST	GR2,FUNCPTRH,GR1
	LAD	GR1,1,GR1
	LAD	GR2,SUB3
	ST	GR2,FUNCPTRH,GR1
; ܂łŁAFUNCPTRH  SUB1, SUB2, SUB3 ̃AhX
; i[ꂽ̂Ŋώ@B
;---֐|C^gĊevOi֐jĂяo----------------------------------------
	LAD	GR1,0
	LD	GR2,FUNCPTRH,GR1	
	PUSH	0,GR1
	CALL	0,GR2 ; SUB1 ĂяoB
	POP	GR1
	;----------------
	LAD	GR1,1,GR1
	LD	GR2,FUNCPTRH,GR1
	PUSH	0,GR1
	CALL	0,GR2 ; SUB2 ĂяoB
	POP	GR1
	;----------------
	LAD	GR1,1,GR1
	LD	GR2,FUNCPTRH,GR1
	PUSH	0,GR1
	CALL	0,GR2 ; SUB3 ĂяoB
	POP 	GR1
	RET
FUNCPTRH   DS	3 ; Function_Pointer_Hairetu ̗
	END
;--------------
SUB1	START
;	PUSH 	0,GR1
	LD	GR1,AA
	LD	GR2,BB
	ADDA 	GR1,GR2
	ST	GR1,KASAN
;	POP 	GR1
	RET
AA	DC 	30
BB	DC	10
KASAN	DS	1
	END
;--------------
SUB2	START
	LD	GR1,AA
	LD	GR2,BB
	SUBA	GR1,GR2
	ST	GR1,SA
	RET
AA	DC 	30
BB	DC	10
SA	DS	1
	END
;--------------
SUB3	START
	LD GR1,CC
	SRA GR1,1
	ST	GR1,DIV2
	RET
CC	DC 	100
DIV2	DS 	1
	END
;--------------
; Type your source code in lowercase. 
; Then press Ctrl+Shift+O at the same time. 
; This will convert all the characters
; to uppercase, excluding character constants,
; such as DC 'sum is '.
; Ctrl+Shift+L converts the characters in the line
; with a blinking cursor to uppercase.
;-----------------------
