;2015H25秋試験プログラム１
;---------------------------
MAIN START
	LD GR0,A
	LAD GR1,B
	LD GR2,N
	LAD GR3,C
	CALL BITINS
	RET
A DC #5E96
B DC #EF18
N DC 10
C DS 2
	END
;-----------------------
BITINS START
	RPUSH
	LD GR6,=16
	SUBA GR6,GR2
	LD GR1,0,GR1
	LD GR4,GR1
	LD GR5,GR0
	SRL GR1,0,GR6
	SLL GR1,0,GR6
	SLL GR4,0,GR2
	SRL GR4,0,GR2
	SRL GR0,0,GR2
	SLL GR5,0,GR6
	OR GR1,GR0
	OR GR4,GR5
	ST GR1,0,GR3
	ST GR4,1,GR3
	RPOP
	RET
	END

