Dragon Quest (MSX)

Dragon Quest makes its first appearance on computers that would keep going, even up to Dragon Quest X.

MSX Version
Present from, complete with minor comments.

Translation:

JUSIN:	LD	HL,WNDFLG LD	DE,WNDFLG+1 LD	BC,4 LD	(HL),5FH	;SPACE CHARACTER CODE LDIR LD	A,0FAH		;END OF MINI SENTENCE CODE LD	(DE),A LD	IX,WNDFLG+4 JUSIN1:	LD	HL,10 LD	(CALCU2),HL CALL	DIVIDE LD	A,(CALCU3) LD	(IX),A DEC	IX LD	HL,(CALCU1) LD	A,H OR	L JR	NZ,JUSIN1 RET CHRPT:	LD	A,(WINDX) LD	H,A LD	A,(WINDY) LD	L,A LD	A,(BGCHR) CHRPUT:	EX	AF,AF LD	A,H ADD	A,A ADD	A,A ADD	A,A LD	H,A LD	A,L ADD	A,A ADD	A,A ADD	A,A LD	L,A EX	AF,AF' JP	CHROUT WINDOZ:	EX	(SP),HL LD	A,(HL) INC	HL EX	(SP),HL WINDOW:	LD	(CALCU1),A CP	3 JR	Z,WIND31 CP	4 JR	NZ,WIND32 WIND31:	LD	A,85H JR	WIND33 WIND32:	CP	9 JR	NZ,WIND34 LD	A,86H WIND33:;CALL	BEEP CALL	SOUND WIND34:	LD	A,(CALCU1) CP	11 JR	NC,WIND3X CP	1 JR	Z,WIND3Z CP	5 JR	C,WIND3X WIND3Z:;CALL	TAIHI WIND3X:	LD	A,(CALCU1) CP	2 JP	C,WINDOS JR	NZ,WIND24 LD	A,0FFH LD	(MAINX),A LD	(MAINY),A CALL	WINDOS LD	A,(WINDY) INC	A LD	(WINDY),A CP	1EH JR	NZ,WIND25 XOR	A WIND25:	LD	(MAINMY),A RET
 * WINDOW ROUTINE
 * INPUT....CALCU1(1)=WINDOW NUMBER
 * WINDOW ROUTINE
 * INPUT....CALCU1(1)=WINDOW NUMBER
 * INPUT....CALCU1(1)=WINDOW NUMBER

WIND24:	PUSH	AF PUSH	AF LD	A,(MAINY) PUSH	AF LD	A,0FFH LD	(MAINY),A LD	A,0FEH LD	(INPUTM),A CALL	WINDOS LD	A,(MAINY) LD	(WINDY),A POP	AF LD	(MAINY),A LD	A,(WIMAXX) INC	A LD	(WIMAXX),A LD	(WINDX),A POP	AF CP	6 JR	NC,WIND26 CP	5 JR	NZ,WIND28 LD	A,(WINDX) ADD	A,2 AND	3FH LD	(WINDX),A LD	(WIMAXX),A LD	A,(WINDY) ADD	A,2 CP	1EH JR	NZ,WIND29 XOR	A WIND29:	LD	(WIMAXY),A LD	A,5 JR	WIND27 WIND28:	XOR	A JR	WIND27 WIND26:	LD	A,0FFH WIND27:	LD	(INPUTX),A XOR	A LD	(INPUTY),A CALL	INPUT POP	AF CP	5 JR	C,WIND30 CALL	CLWIND WIND30:	LD	A,(INPUTM) OR	A RET

WINDOS:	LD	A,(CALCU1) CP	1 JR	Z,WIND20 CP	6 JR	Z,WIND20 CP	7 JR	Z,WIND20 CP	8 JR	Z,WIND20 WIND19:	LD	HL,MATITL LD	B,11 LD	A,1 WID19L:	LD	(HL),A INC	HL INC	A DJNZ	WID19L WIND20:	LD	A,(CALCU1) LD	E,A ADD	A,A ADD	A,A	;4 ADD	A,E ADD	A,E ADD	A,E LD	D,0 LD	E,A LD	A,0EH LD	(7800H),A	;BANK SELECT LD	IY,WINDDA ADD	IY,DE LD	A,(IY) LD	(BGAND),A	;KIND OF WINDOW LD	A,(IY+1) LD	(WINDDY),A LD	A,(IY+2) LD	(WINDDY+1),A	;WINDOW DATA ADDRESS LD	A,(IY+6)	;MATITLE NO OWARI NI END MARK O	SRL	A LD	HL,MATITL ADD	A,L LD	L,A LD	(HL),0FFH LD	A,(IY+3) AND	1FH SLA	A LD	(WINDX),A	;WINDOW X POSITION LD	A,(MAINX) CP	0FFH JR	NZ,WIND21 LD	A,(WINDX) INC	A LD	(MAINX),A LD	(MAINMX),A WIND21:	LD	A,(IY+4) ADD	A,A LD	(WINDY),A	;WINDOW Y POSITION LD	A,(MAINY) CP	0FFH JR	NZ,WIND22 LD	A,(WINDY) ADD	A,2 CP	1EH JR	NZ,WIND23 XOR	A WIND23:	LD	(MAINY),A WIND22:	LD	A,(IY+3) LD	(CALCU1),A LD	A,(IY+4) LD	(CALCU2),A CALL	CASCAD LD	HL,(BGADD) LD	(CALCU4),HL LD	(PALTAD),HL LD	A,(IY+5) LD	(WIMAXX),A	;WINDOW MAX X POSITION LD	HL,(WINDDY) WIND13:	LD	A,(HL) INC	HL CP	0FFH		;END OF SENTENCE CODE JR	NZ,WIND13 LD	(WINDDZ),HL LD	HL,(WINDDZ) WIND14:	LD	A,(HL) INC	HL CP	0FFH JR	NZ,WIND14 LD	(DATAAD),HL LD	(DATAA2),HL XOR	A LD	(WIMAXY),A LD	HL,MATITL WIND18:	LD	A,(HL) CP	0FFH JR	Z,WIND17 LD	A,(WIMAXY) INC	A INC	A LD	(WIMAXY),A INC	HL JR	WIND18

WIND17:	LD	A,(INPUTM) CP	0FEH JR	NZ,WIND16 LD	A,(WIMAXY) SRL	A DEC	A LD	(INPUTM),A WIND16:	LD	A,(WIMAXY)		;WRITE SCREEN'S WORK LD	B,A WINDO3:	LD	C,0 LD	IX,(CALCU4) WINDO2:	LD	A,(BGAND) OR	A LD	A,0 JR	NZ,WIND0X LD	A,(IX) CP	0FFH JR	NZ,WINDO1 WINDO0:	LD	A,0FEH WIND0X:	LD	(IX),A WINDO1:	INC	IX INC	C LD	A,(WIMAXX) CP	C JR	NZ,WINDO2 LD	HL,(CALCU4) LD	DE,20H ADD	HL,DE LD	(CALCU4),HL DEC	B JR	NZ,WINDO3 CALL	MAN LD	A,0EH LD	(7800H),A LD	HL,(PALTAD) LD	(CALCU4),HL LD	A,(WINDX) LD	(WIMAXX),A XOR	A LD	(INPUTX),A WINDO4:	LD	HL,(WINDDZ) LD	(DATAAD),HL LD	A,(INPUTX) LD	HL,MATITL ADD	A,L LD	L,A LD	A,(HL) LD	(INPUTY),A WINDO5:	LD	HL,(DATAAD) LD	A,(HL) INC	HL LD	(DATAAD),HL CP	0FFH JR	NZ,WINDO5 LD	HL,INPUTY DEC	(HL) JR	NZ,WINDO5 CALL	PRINT0 LD	HL,(PALTAD) LD	DE,20H ADD	HL,DE LD	(PALTAD),HL LD	(CALCU4),HL LD	A,(WIMAXX) LD	(WINDX),A LD	HL,WINDY INC	(HL) LD	HL,INPUTX INC	(HL) LD	A,(INPUTX) LD	HL,MATITL ADD	A,L LD	L,A LD	A,(HL) CP	0FFH JR	NZ,WINDO7 LD	HL,(WINDDZ) LD	(DATAAD),HL JP	PRINT0

WINDO7:	LD	HL,(WINDDY) LD	(DATAAD),HL CALL	PRINT0 LD	A,(WIMAXX) LD	(WINDX),A LD	A,(WINDY) INC	A LD	(WINDY),A CP	1EH JR	NZ,WINDO8 XOR	A LD	(WINDY),A WINDO8:	LD	HL,(PALTAD) LD	DE,20H ADD	HL,DE LD	(PALTAD),HL LD	(CALCU4),HL JP	WINDO4 CLWIND:	LD	(CALCU1),A LD	(0F2FFH),A LD	E,A ADD	A,A ADD	A,A ADD	A,E ADD	A,E ADD	A,E LD	HL,WINDDA ADD	A,L LD	L,A JR	NC,$+3 INC	H LD	A,0EH LD	(7800H),A LD	A,(HL) LD	(BGAND),A INC	HL INC	HL INC	HL LD	A,(HL) ADD	A,A SUB	16 LD	D,A INC	HL LD	A,(HL) ADD	A,A SUB	12 LD	E,A INC	HL LD	A,(HL) ADD	A,D EX	AF,AF' INC	HL LD	A,(HL) ADD	A,E LD	L,A EX	AF,AF' LD	H,A LD	A,D LD	(PUTX),A CLWIN0:	LD	A,E LD	(PUTY),A CLWIN1:	PUSH	HL PUSH	DE LD	A,(PUTX) ADD	A,16 LD	(CALCU1),A LD	H,A LD	A,(PUTY) ADD	A,12 LD	(CALCU2),A LD	L,A PUSH	HL CALL	CLWORK POP	HL LD	A,(BGAND) OR	A JR	Z,CLWIN5 LD	A,(0F2FFH) CP	4 JR	NZ,CLWIN4 LD	A,(MONSNO) CP	39 JR	NZ,CLWIN4 LD	A,22 CALL	PPATARN JR	CLWIN5 CLWIN4:	CALL	PFIELD CLWIN5:	POP	DE POP	HL LD	A,(PUTY) INC	A INC	A LD	(PUTY),A CP	L JR	NZ,CLWIN1 LD	A,(PUTX) INC	A INC	A LD	(PUTX),A CP	H JR	NZ,CLWIN0 LD	A,(MOVFLG) OR	A CALL	NZ,MAN RET CLWORK:	PUSH	HL PUSH	HL CALL	CASCA0 POP	DE LD	A,D LD	(CALCU1),A LD	A,E LD	(CALCU2),A LD	HL,(BGADD) LD	A,(HL) PUSH	AF LD	DE,0 CALL	CLWOK2 INC	HL LD	D,8 CALL	CLWOK2 LD	DE,20H-1 ADD	HL,DE LD	D,0 LD	E,8 CALL	CLWOK2 INC	HL LD	D,8 LD	E,8 CALL	CLWOK2 POP	AF POP	HL CP	0F0H RET	C CALL	PFIELD RET CLWOK2:	LD	A,(BGAND) OR	A JR	NZ,CLWOK3 LD	A,(HL) CP	0FEH JR	Z,CLWOK3 PUSH	HL PUSH	AF LD	A,(CALCU1) ADD	A,A ADD	A,A ADD	A,A ADD	A,D LD	H,A LD	A,(CALCU2) ADD	A,A ADD	A,A ADD	A,A ADD	A,E LD	L,A POP	AF CALL	CHROUT POP	HL RET CLWOK3:	LD	A,0FFH LD	(HL),A RET ROLE:	CALL	ROLES ROLES:	LD	HL,1238H LD	C,5 ROLE0:	PUSH	HL LD	B,144 ROLE1:	PUSH	HL CALL	004AH DEC	H CALL	004DH POP	HL INC	HL DJNZ	ROLE1 POP	HL INC	H DEC	C JR	NZ,ROLE0 LD	HL,1638H LD	BC,144 XOR	A JP	0056H PRMAIN:	LD	(CALCU1),A XOR	A LD	(CALCU1+1),A JR	PRMA11
 * CLEAR WINDOW ROUTINE
 * INPUT
 * CALCU1(1)....WINDOW NUMBER
 * CALCU1(1)....WINDOW NUMBER
 * LD	A,0FEH
 * LD	(HL),A
 * MAIN PANNEL SCRLL ROUTINE
 * MAIN PANNEL SCRLL ROUTINE
 * MAIN PANNEL SCRLL ROUTINE
 * PRINT MAIN ROUTINE
 * INPUT
 * CALCU1(2)....PRINT SENTENCE NUMBER
 * CALCU1(2)....PRINT SENTENCE NUMBER

PRMAIO:	LD	A,1 LD	(CALCU1+1),A JR	PRMAIQ

PRMAIZ:	XOR	A LD	(CALCU1+1),A

PRMAIQ:	EX	(SP),HL LD	A,(HL) INC	HL EX	(SP),HL LD	(CALCU1),A	;CALCU1+1=0

PRMA11:	XOR	A LD	(MONSN2),A LD	A,0EH LD	(7800H),A LD	A,0FH LD	(7000H),A LD	HL,(CALCU1) ADD	HL,HL LD	(CALCU1),HL LD	DE,PTABLE ADD	HL,DE LD	A,(HL) INC	HL LD	H,(HL) LD	L,A LD	DE,8000H ADD	HL,DE LD	(TABADD),HL LD	(DATAAD),HL PRMAI1:	LD	A,(MAINX)	;MAIN PANNEL'S CURSOR X POS. LD	(WINDX),A LD	A,(MAINY)	;MAIN PANNEL'S CURSOR Y POS. LD	(WINDY),A LD	A,(MAINMX)	;LEFT MARG X POS. LD	(WIMAXX),A LD	A,0FFH LD	(BGAND),A	;WRITE SCREEN WORK FLAG CALL	PRMA12 CALL	PRMAIS CALL	PRMAI9 LD	A,(WINDX) LD	(MAINX),A LD	A,(WINDY) LD	(MAINY),A LD	A,2 LD	(7000H),A LD	A,0EH LD	(7800H),A RET PRMAIS:	CALL	WITNMI		;WAIT NMI LD	A,0FFH LD	(NMIFLG),A PRMAI4: PRMAI0:	CALL	WITNMI LD	A,(DEBUG) LD	B,A OR	A JR	Z,PRMA99 PRMA98:	CALL	WITNMI DJNZ	PRMA98 PRMA99:	LD	HL,(DATAAD) LD	A,(HL) CP	6DH JR	Z,PRMA80 CP	6EH JR	NZ,PRMA81 PRMA80:	LD	A,0FFH LD	(MONSN2),A PRMA81:	CALL	PRACHR LD	A,(MONSN2) OR	A JR	Z,PRMA82 LD	HL,(DATAAD) LD	A,(HL) CP	4FH JR	C,PRMA83 CP	63H JR	C,PRMA82 CP	6CH JR	NC,PRMA82 PRMA83:	LD	A,90H CALL	BEEP PRMA82:	LD	HL,(DATAAD) LD	A,(HL) CP	6DH JR	C,PRMAI6 CP	70H JR	NC,PRMAI6 LD	A,(WINDX) LD	(WIMAXX),A LD	HL,(CALCU4) LD	(PALTAD),HL PRMAI6:	CALL	PRMAI9		;CHECK SCRLL LD	HL,(DATAAD) INC	HL LD	(DATAAD),HL LD	A,(HL) CP	0FCH JP	NZ,PRMAIS PRMA16:	LD	A,(MAINMX) LD	(WIMAXX),A JP	PRMAIS PRMAI9:	LD	A,(WINDY) LD	E,A LD	A,(MAINMY) CP	E RET	NZ CALL	ROLE LD	A,(WINDY) DEC	A DEC	A LD	(WINDY),A CP	0FEH RET	NZ LD	A,1CH LD	(WINDY),A RET PRMA12:	RET PRMA13: PRMA17: PRMA19: PRMAB0: PRMAB1: PRMAB2: PRMAB3:	RET INPSUB:	LD	A,5FH JR	INPSUX
 * MAIN PANNEL PRINT SUB ROUTINE
 * MAIN PANNEL PRINT SUB ROUTINE
 * CALL	SOUND
 * CHECK MAIN PANNEL SCRLL
 * CHECK MAIN PANNEL SCRLL
 * CALCURATION ADDRESS
 * CALCURATION ADDRESS
 * SET MAIN CHR-ROM
 * SET MAIN CHR-ROM
 * WINDOW INPUT ROUTINE
 * WINDOW INPUT ROUTINE

INPSU0:	LD	A,56H INPSUX:	LD	(BGCHR),A JP	CHRPT INPUT:	LD	A,0FFH LD	(TIMER),A INPUT4:	CALL	WITNMI CALL	INPSUB LD	A,(KEYDAT) OR	A PUSH	AF CALL	LKEY POP	AF JR	Z,INPUT8 LD	A,(TIMER) AND	0FH CP	0CH JP	NZ,INPUT0 INPUT8:	LD	A,(KEYDAT) AND	1		;A BUTTON JR	Z,INPUT1 CALL	INPSU0 LD	A,(INPUTX) CP	1 JR	Z,INPUT2 XOR	A LD	(INPUTM),A INPUT2:	LD	A,(INPUTY) LD	HL,INPUTM ADD	A,(HL) LD	(HL),A LD	A,85H CALL	SOUND LD	A,(INPUTM) OR	A RET
 * CALL	BEEP

INPUT1:	LD	A,(KEYDAT) AND	2		;B BUTTON JR	Z,INPUT3 CALL	INPSU0 LD	A,85H CALL	SOUND LD	A,0FFH LD	(INPUTM),A OR	A RET
 * CALL	BEEP

INPUT3:	LD	A,(KEYDAT) AND	10H		;UP JR	Z,INPUT5 LD	A,(INPUTX) CP	5 JR	Z,INPU12 LD	A,(INPUTY) OR	A JP	Z,INPUT0 INPU18:	LD	HL,INPUTY DEC	(HL) LD	A,(WINDY) DEC	A DEC	A LD	(WINDY),A CP	0FEH JP	NZ,INPU10 INPU19:	LD	A,1CH LD	(WINDY),A JP	INPU10 INPU12:	LD	A,(INPUTY) OR	A JP	Z,INPUT0 INPU20:	XOR	A LD	(INPUTY),A LD	A,(WIMAXX) LD	(WINDX),A LD	A,(WIMAXY) SUB	2 CP	0FEH JR	NZ,INPU13 LD	A,1CH INPU13:	LD	(WINDY),A JP	INPU10

INPUT5:	LD	A,(KEYDAT) AND	20H		;DOWN JR	Z,INPUT6 LD	A,(INPUTX) CP	5 JR	Z,INPU14 LD	A,(INPUTY) INC	A LD	(INPUTY),A LD	HL,INPUTM CP	(HL) JR	NZ,INPUT7 DEC	A LD	(INPUTY),A JP	INPUT0 INPUT7:	LD	A,(WINDY) INC	A INC	A LD	(WINDY),A CP	1EH JP	NZ,INPU10 INPU21:	XOR	A LD	(WINDY),A JP	INPU10 INPU14:	LD	A,2 LD	HL,INPUTY CP	(HL) JP	Z,INPUT0 INPU22:	LD	(INPUTY),A LD	A,(WIMAXX) LD	(WINDX),A LD	A,(WIMAXY) ADD	A,2 CP	1EH JR	NZ,INPU15 XOR	A INPU15:	LD	(WINDY),A JP	INPU10

INPUT6:	LD	A,(KEYDAT) AND	40H		;LEFT JR	Z,INPUT9 LD	A,(INPUTX) CP	5 JR	Z,INPU16 LD	A,(INPUTX) CP	1 JR	NZ,INPUT0 LD	HL,INPUTX DEC	(HL) LD	A,(WINDX) SUB	6 AND	3FH LD	(WINDX),A JP	INPU10 INPU16:	LD	A,3 LD	HL,INPUTY CP	(HL) JR	Z,INPUT0 LD	(HL),A LD	A,(WIMAXY) LD	(WINDY),A LD	A,(WIMAXX) SUB	2 AND	3FH LD	(WINDX),A JP	INPU10

INPUT9:	LD	A,(KEYDAT) AND	80H		;RIGHT JR	Z,INPUT0 LD	A,(INPUTX) CP	5 JR	Z,INPU17 LD	A,(INPUTX) OR	A JR	NZ,INPUT0 LD	HL,INPUTX INC	(HL) LD	A,(WINDX) ADD	A,6 AND	3FH LD	(WINDX),A JP	INPU10 INPU17:	LD	A,1 LD	HL,INPUTY CP	(HL) JR	Z,INPUT0 LD	(HL),A LD	A,(WIMAXY) LD	(WINDY),A LD	A,(WIMAXX) ADD	A,2 AND	3FH LD	(WINDX),A

INPU10:	XOR	A LD	(TIMER),A INPUT0:	LD	A,(TIMER) AND	10H JR	NZ,INPU11 CALL	INPSU0 INPU11:	JP	INPUT4 PAUSE:	XOR	A CALL	00D8H OR	A JR	Z,PAUSE PAUSE2:	XOR	A CALL	00D8H OR	A JR	NZ,PAUSE2 RET MPDATA:	DB	0,0,0,0,255 MONSTR:	LD	A,(MONSNO) CP	39 JR	NZ,MONST3 MONST3:	LD	A,0BH LD	(7800H),A CALL	JIBUNO LD	A,8 LD	(7000H),A INC	A LD	(7800H),A LD	A,(MONSNO) ADD	A,A LD	HL,08000H LD	L,A LD	A,(HL) INC	HL LD	H,(HL) LD	L,A LD	E,(HL) INC	HL LD	D,(HL) INC	HL LD	(CALCU1),DE LD	DE,0 LD	(CALCU2),DE LD	A,(HL) INC	HL PUSH	HL POP	IX LD	B,A AND	80H LD	(0F2F0H),A LD	A,B AND	7FH LD	B,A LD	HL,MONOFS LD	A,(MONSNO) ADD	A,A ADD	A,L LD	L,A JR	NC,$+3 INC	H LD	A,(HL) ADD	A,A ADD	A,A ADD	A,A LD	D,A INC	HL LD	A,(HL) ADD	A,A ADD	A,A ADD	A,A LD	E,A MONST2:	PUSH	BC PUSH	IX PUSH	DE LD	A,(CALCU2) LD	HL,1B00H ADD	A,A ADD	A,A LD	L,A LD	A,(IX+1) ADD	A,E CALL	004DH INC	HL LD	A,(IX) ADD	A,D LD	D,A LD	A,(0F2F0H)	;HANTEN FLAG OR	A JR	Z,MSHT0 XOR	A SUB	D ADD	A,4 LD	D,A MSHT0:	LD	A,D CALL	004DH INC	HL LD	A,(CALCU2) ADD	A,A ADD	A,A CALL	004DH INC	HL LD	A,(IX+2) CALL	004DH LD	HL,(CALCU2) ADD	HL,HL ADD	HL,HL ADD	HL,HL ADD	HL,HL ADD	HL,HL LD	DE,3800H ADD	HL,DE EX	DE,HL MSHT1:	LD	HL,(CALCU1) LD	BC,32 CALL	005CH MSHT2:	LD	HL,(CALCU1) LD	DE,32 ADD	HL,DE LD	(CALCU1),HL POP	DE POP	IX INC	IX INC	IX INC	IX LD	A,(CALCU2) INC	A LD	(CALCU2),A POP	BC DEC	B JP	NZ,MONST2 LD	A,(IX) OR	(IX+1) JR	Z,MONST9 LD	L,(IX) LD	H,(IX+1) PUSH	HL POP	IX MONST8:	LD	A,(IX) OR	(IX+1) JR	Z,MONST9 PUSH	IX PUSH	DE LD	A,(IX) ADD	A,A ADD	A,A ADD	A,A ADD	A,E LD	L,A LD	A,(IX+1) ADD	A,A ADD	A,A ADD	A,A ADD	A,D LD	H,A LD	A,H LD	H,0 REPT	5 ADD	HL,HL ENDM ADD	A,L LD	L,A JR	NC,$+3 INC	H EX	DE,HL INC	IX INC	IX PUSH	IX POP	HL CALL	ONEPUT POP	DE POP	IX LD	BC,8*2+2 ADD	IX,BC JR	MONST8 MONST9:	LD	A,2 LD	(7000H),A INC	A LD	(7800H),A RET MONOFS: ;1  2    3     4     5    6      7     8     9     0 DB 10,5, 10,5, 9,4, 10,4, 10,6,  9,4,	10,6, 11,4, 10,4, 10,3 DB 10,4, 10,6, 10,6, 10,6, 10,6, 10,6,	10,5, 10,4, 10,6, 11,4 DB 10,3, 9,6, 10,6, 10,6, 10,6, 10,6,	10,6,  9,6, 10,6, 10,6 DB 9,6,  9,6, 10,6, 10,6,  9,6, 10,6,	10,6,  9,6, 10,6, 10,6 HANTEN:	PUSH	DE LD	HL,(CALCU1) LD	DE,0F2A0H LD	BC,32 LDIR LD	HL,0F2A0H LD	DE,0F2A0H+16 LD	B,16 HANTL0:	LD	A,(HL) REPT	8 RLA RR	C ENDM LD	A,C EX	AF,AF' LD	A,(DE) REPT	8 RLA RR	C ENDM LD	(HL),C EX	AF,AF' LD	(DE),A INC	HL INC	DE DJNZ	HANTL0 LD	HL,0F2A0H POP	DE LD	BC,32 CALL	005CH RET START:	CALL	0138H RRCA RRCA AND	11B LD	C,A LD	B,0 LD	HL,0FCC1H ADD	HL,BC LD	C,A LD	A,(HL) AND	80H OR	C LD	C,A INC	HL INC	HL INC	HL INC	HL LD	A,(HL) AND	1100B OR	C LD	H,80H CALL	0024H LD	A,0AH LD	(7000H),A LD	HL,8000H LD	DE,0D000H LD	BC,2000H LDIR XOR	A CALL	SOUND LD	A,2 LD	(0FCAFH),A CALL	005FH LD	HL,1800H LD	B,3 PMTST1:	LD	C,0 PMTST0:	LD	A,C CALL	004DH INC	HL INC	C JR	NZ,PMTST0 DJNZ	PMTST1 LD	HL,2000H LD	BC,1800H LD	A,0F4H CALL	0056H DI LD	SP,0F380H LD	HL,NMI LD	A,0C3H LD	(0FDA0H),HL LD	(0FD9FH),A LD	A,(0F3E0H) OR	22H LD	(0F3E0H),A LD	B,A LD	C,1 CALL	0047H EI XOR	A LD	(0F3DBH),A LD	A,1 LD	(6800H),A LD	A,2 LD	(7000H),A LD	A,15 LD	(0F3E9H),A LD	(PLTCOL),A LD	A,1 LD	(0F3EAH),A LD	(0F3EBH),A CALL	0062H LD	A,1 LD	(6800H),A INC	A LD	(7000H),A LD	HL,0C000H LD	DE,0C000H+1 LD	BC,0FFH LD	(HL),0 LDIR			;FILL $00 TO $FF = $00 LD	A,0FFH LD	(HITPNT),A LD	A,8 LD	(CHUNX),A LD	A,7 LD	(CHUNY),A JR	MSKIP LD	A,1 LD	(FIELD),A MSLP0:	XOR	A LD	(MONSNO),A MSLP:	CALL	PUTBAK CALL	CLSOBJ CALL	MONSTR CALL	PAUSE LD	A,(MONSNO) INC	A LD	(MONSNO),A CP	40 JR	NZ,MSLP JR	MSLP0 MSKIP: LD	A,4 LD	(7000H),A INC	A LD	(7800H),A CALL	8000H CALL	0069H LD	A,15 LD	(0F3E9H),A LD	(PLTCOL),A LD	A,1 LD	(0F3EAH),A LD	(0F3EBH),A CALL	0062H LD	A,2 LD	(7000H),A
 * PUT MONSTER ROUTINE
 * PUT MONSTER ROUTINE
 * CALL	CLSOBJ
 * LD	A,(0F2F0H)
 * OR	A
 * JR	Z,MSHT1
 * CALL	HANTEN
 * JR	MSHT2
 * PROGRAM START ROUTINE
 * PROGRAM START ROUTINE
 * CALL	CLSOBJ
 * CALL	CLSOBJ

LD	A,(NFLDY) CP	10H JP	NZ,STAR93 STAR94:	LD	A,0CH LD	(7000H),A CALL	8000H LD	A,2 LD	(7000H),A JP	STAR92

STAR93:	LD	A,0CH LD	(7000H),A CALL	8003H LD	A,2 LD	(7000H),A STAR92:	LD	A,15 LD	(PLTCOL),A LD	A,3 LD	(7800H),A LD	HL,(0A004H) LD	DE,3800H LD	BC,800H CALL	005CH LD	A,0EH LD	(7800H),A LD	A,0FAH LD	(NAME+4),A XOR	A LD	(PUTFLG),A LD	HL,DOORFL LD	DE,DOORFL+1 LD	BC,1FH LD	(HL),0 LDIR CALL	STARSU LD	A,(HIMEFG) AND	8 JR	Z,STAR97 CALL	PRMAIO DB	17H LD	A,(LEVEL) CP	30 JR	NZ,STAR90 CALL	PRMAIZ DB	2 JP	STAR95 STAR90:	CALL	NEXTEP CALL	PRMAIZ DB	0C1H CALL	PRMAIO DB	18H STAR95:	CALL	PRMAIZ

MSX2 Version
What seems to be music data, this time present from : QV M0	LAHM,QV M0	SOH,CT M0	FAH,QV M0	SOH,QV M0	SIHM,QV M0	LAHM,QV M0	SOH,QV M0	FAH,QV M0	MIH,CT M0	REH,QV M0	MIH,QV M0	SOH,CT M0	DOH,CT M5	SUSPCS M5	SUSPCS M0	FA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M0	LALL,KQV-KSQ M2	0,KSQ M0	REL,KQV-KSQ M2	0,KSQ
 * DB	NTCONT,QV
 * DB	JUMP
 * DB	JUMP
 * DB	JUMP
 * DB	JUMP
 * DB	JUMP
 * DB	JUMP
 * DB	JUMP
 * DB	JUMP
 * DB	JUMP
 * DW	DT50+ENV2
 * M13 DT12+ENV6,1
 * DW	DT12+ENV2

M0	MIL,KQV-KSQ M2	0,KSQ M0	REL,KQV-KSQ M2	0,KSQ
 * DW	DT50+ENV2

M0	LALL,KQV-KSQ M2	0,KSQ M0	REL,KQV-KSQ M2	0,KSQ
 * DW	DT12+ENV2

M6	RETS KINGBS: M0	FALP,KQV-KSQ M2	0,KSQ M0	RELP,KQV-KSQ M2	0,KSQ M0	FALP,KQV-KSQ M2	0,KSQ M0	RELP,KQV-KSQ M2	0,KSQ KINGBT: M0		FALP,KQV-KSQ M2	0,KSQ M0	RELP,KQV-KSQ M2	0,KSQ M0	FALP,KQV-KSQ M2	0,KSQ M0	RELP,KQV-KSQ M2	0,KSQ M6 	RETS KINGC: M8	4+4+2
 * M2	0,KQV
 * M5	KINGAL

KINGCA: M2	0,KWL M2	0,KWL M2	0,KWL M2	0,KWL M2	0,KHF M5	KINGAS M5	KINGM M5	KINGCA
 * DB	NTCONT,QV

KINGCL: M0	DOP,KQV M0	REP,KQV
 * M13 DT12+ENV6,1

M0	DOP,KQV M0	REP,KQV M0	DOP,KQV M0	REP,KQV M0	DOP,KQV M0	REP,KQV M5	KINGCS M5	KINGCS M5	KINGCS M5	KINGCT M5	KINGCL KINGCS: M0	FAP,KQV M0	REP,KQV M0	FAP,KQV M0	REP,KQV KINGCT: M0	FAP,KQV M0	REP,KQV M0 	FAP,KQV
 * DB	JUMP
 * DB	JUMP
 * DB	JUMP
 * DB	JUMP
 * DB	JUMP
 * M6	RETS