Collatz Problem by *yuko*

\xcd\x03\x80on\x0e
T]\xcb\x1c\xcb\x1d0\x03\xedZ)\xe5y\xf5\x11\xff\xff\xedB\x130\xfb\x09}\xd6\xd0\xf5\xeb|\xb5 \xee\xf1\xff8\xfc\xe1}= \xd7v\x166\x06

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

Disassemble:

	ORG	00000H

	CALL 08003H		;0000	CD 03 80 	. . . 
	LD L,A			;0003	6F 	O 
	LD L,(HL)			;0004	6E 	N 
	LD C,00AH		;0005	0E 0A 	. . 
	LD D,H			;0007	54 	T 
	LD E,L			;0008	5D 	] 
	RR H		;0009	CB 1C 	. . 
	RR L		;000B	CB 1D 	. . 
	JR NC,$+5		;000D	30 03 	0 . 
	ADC HL,DE		;000F	ED 5A 	. Z 
	ADD HL,HL			;0011	29 	) 
	PUSH HL			;0012	E5 	. 
	LD A,C			;0013	79 	Y 
	PUSH AF			;0014	F5 	. 
	LD DE,0FFFFH		;0015	11 FF FF 	. . . 
	SBC HL,BC		;0018	ED 42 	. B 
	INC DE			;001A	13 	. 
	JR NC,$-3		;001B	30 FB 	0 . 
	ADD HL,BC			;001D	09 	. 
	LD A,L			;001E	7D 	} 
	SUB 0D0H		;001F	D6 D0 	. . 
	PUSH AF			;0021	F5 	. 
	EX DE,HL			;0022	EB 	. 
	LD A,H			;0023	7C 	| 
	OR L			;0024	B5 	. 
	JR NZ,$-16		;0025	20 EE 	  . 
	POP AF			;0027	F1 	. 
	RST 38H			;0028	FF 	. 
	JR C,$-2		;0029	38 FC 	8 . 
	POP HL			;002B	E1 	. 
	LD A,L			;002C	7D 	} 
	DEC A			;002D	3D 	= 
	JR NZ,$-39		;002E	20 D7 	  . 
	HALT			;0030	76 	V 
	LD D,036H		;0031	16 36 	. 6 
	DEFB 006H		;0033	06 	. 

download

return top