【BA4988】_8324函数(未完成)

反汇编:

_8324()
{
	if (_20ED >= _20EB)
	{
		Y=_20ED
		20ED = 20EB
		20EB = Y
		Y=20EE
		20EE=20EC
		20EC=Y
	}
	2081=20ED
	2082=20EE
	_853B() // 00E9753B
	
	20CF=20EB-20ED
	if (20EB >= 20ED)
	{
		20D0=20EC-20EE
		if (20EC>=20EE)
		{
			if (20CF >= 20D0)
			{
				20DC=0x01
				20E1=20EE-20EC
				if (20EE>=20EC)
				{
					20E2=0
				}
				else
				{
					20E2=0xFF
				}
				20DF=(U16)20EB-(U16)20ED
				20D6=(U16)20E1+(U16)20E1
				20D6+=20DF
				20D8=(U16)20E1+(U16)20E1
				20DA=(U16)20DF+(U16)20DF
				20DA+=20D8
				20DD=20ED
				20DE=20EE
				while (20DD < 20EB)
				{
					if (20D7 >= 0x00)
					{
						20DD+=1
						20D6+=20D8
						20D0=20DE-20EE
						20CF=20DD-20ED
						switch (20DC)
						{
						case 0x01:
							2081=20DD
							2082=20DE
							break;
						case 0x02:
							goto 84E5
							break
						case 0x03:
							2081=20ED+20D0
							2082=20EE-20CF
							break
						default:
							???
							break
						}
						_853B()
						continue
					}
					else
					{
						goto 8493
					}
				}
				return
			}
			else
			{
				goto 8381
			}
		}
		else
		{
			goto 839D
		}
	}
	else
	{
		goto 83DC
	}
}

汇编:

[00E97324]8324 [AD ED 20]: LDA $20ED = #$0F @ 送累加器
[00E97327]8327 [CD EB 20]: CMP $20EB = #$90 @ 累加器与存储器比较
[00E9732A]832A [90 18 AC]: BCC $8344 @ 进位为0分支
[00E9732C]832C [AC ED 20]: LDY $20ED = #$0F @ 送变址寄存器Y
[00E9732F]832F [AD EB 20]: LDA $20EB = #$0F @ 送累加器
[00E97332]8332 [8D ED 20]: STA $20ED = #$0F @ 存累加器
[00E97335]8335 [8C EB 20]: STY $20EB = #$0F @ 存变址寄存器Y
[00E97338]8338 [AC EE 20]: LDY $20EE = #$12 @ 送变址寄存器Y
[00E9733B]833B [AD EC 20]: LDA $20EC = #$4A @ 送累加器
[00E9733E]833E [8D EE 20]: STA $20EE = #$4A @ 存累加器
[00E97341]8341 [8C EC 20]: STY $20EC = #$12 @ 存变址寄存器Y
[00E97344]8344 [AD ED 20]: LDA $20ED = #$0F @ 送累加器
[00E97347]8347 [8D 81 20]: STA $2081 = #$0F @ 存累加器
[00E9734A]834A [AD EE 20]: LDA $20EE = #$4A @ 送累加器
[00E9734D]834D [8D 82 20]: STA $2082 = #$4A @ 存累加器
[00E97350]8350 [20 3B 85]: JSR $853B @ 转子$00E9753B
[00E97353]8353 [38 AD EB]: SEC @ 置进位标志
[00E97354]8354 [AD EB 20]: LDA $20EB = #$90 @ 送累加器
[00E97357]8357 [ED ED 20]: SBC $20ED = #$0F @ 带借位的减法
[00E9735A]835A [8D CF 20]: STA $20CF = #$81 @ 存累加器
[00E9735D]835D [AD EB 20]: LDA $20EB = #$90 @ 送累加器
[00E97360]8360 [CD ED 20]: CMP $20ED = #$0F @ 累加器与存储器比较
[00E97363]8363 [90 77 38]: BCC $83DC @ 进位为0分支
[00E97365]8365 [38 AD EC]: SEC @ 置进位标志
[00E97366]8366 [AD EC 20]: LDA $20EC = #$4A @ 送累加器
[00E97369]8369 [ED EE 20]: SBC $20EE = #$4A @ 带借位的减法
[00E9736C]836C [8D D0 20]: STA $20D0 = #$00 @ 存累加器
[00E9736F]836F [30 2C AD]: BMI $839D @ 结果为负分支
[00E97371]8371 [AD CF 20]: LDA $20CF = #$81 @ 送累加器
[00E97374]8374 [CD D0 20]: CMP $20D0 = #$00 @ 累加器与存储器比较
[00E97377]8377 [90 08 A9]: BCC $8381 @ 进位为0分支
[00E97379]8379 [A9 01 8D]: LDA #$01 @ 送累加器
[00E9737B]837B [8D DC 20]: STA $20DC = #$01 @ 存累加器
[00E9737E]837E [4C DD 83]: JMP $83DD @ 转移$00E973DD

[00E973DD]83DD [38 AD EE]: SEC @ 置进位标志
[00E973DE]83DE [AD EE 20]: LDA $20EE = #$4A @ 送累加器
[00E973E1]83E1 [ED EC 20]: SBC $20EC = #$4A @ 带借位的减法
[00E973E4]83E4 [8D E1 20]: STA $20E1 = #$00 @ 存累加器
[00E973E7]83E7 [A9 00 E9]: LDA #$00 @ 送累加器
[00E973E9]83E9 [E9 00 8D]: SBC #$00 @ 带借位的减法
[00E973EB]83EB [8D E2 20]: STA $20E2 = #$00 @ 存累加器
[00E973EE]83EE [38 AD EB]: SEC @ 置进位标志
[00E973EF]83EF [AD EB 20]: LDA $20EB = #$90 @ 送累加器
[00E973F2]83F2 [ED ED 20]: SBC $20ED = #$0F @ 带借位的减法
[00E973F5]83F5 [8D DF 20]: STA $20DF = #$81 @ 存累加器
[00E973F8]83F8 [A9 00 E9]: LDA #$00 @ 送累加器
[00E973FA]83FA [E9 00 8D]: SBC #$00 @ 带借位的减法
[00E973FC]83FC [8D E0 20]: STA $20E0 = #$00 @ 存累加器
[00E973FF]83FF [18 AD E1]: CLC @ 清进位标志
[00E97400]8400 [AD E1 20]: LDA $20E1 = #$00 @ 送累加器
[00E97403]8403 [6D E1 20]: ADC $20E1 = #$00 @ 带进位加
[00E97406]8406 [8D D6 20]: STA $20D6 = #$00 @ 存累加器
[00E97409]8409 [AD E2 20]: LDA $20E2 = #$00 @ 送累加器
[00E9740C]840C [6D E2 20]: ADC $20E2 = #$00 @ 带进位加
[00E9740F]840F [8D D7 20]: STA $20D7 = #$00 @ 存累加器
[00E97412]8412 [18 AD D6]: CLC @ 清进位标志
[00E97413]8413 [AD D6 20]: LDA $20D6 = #$00 @ 送累加器
[00E97416]8416 [6D DF 20]: ADC $20DF = #$81 @ 带进位加
[00E97419]8419 [8D D6 20]: STA $20D6 = #$81 @ 存累加器
[00E9741C]841C [AD D7 20]: LDA $20D7 = #$00 @ 送累加器
[00E9741F]841F [6D E0 20]: ADC $20E0 = #$00 @ 带进位加
[00E97422]8422 [8D D7 20]: STA $20D7 = #$00 @ 存累加器
[00E97425]8425 [18 AD E1]: CLC @ 清进位标志
[00E97426]8426 [AD E1 20]: LDA $20E1 = #$00 @ 送累加器
[00E97429]8429 [6D E1 20]: ADC $20E1 = #$00 @ 带进位加
[00E9742C]842C [8D D8 20]: STA $20D8 = #$00 @ 存累加器
[00E9742F]842F [AD E2 20]: LDA $20E2 = #$00 @ 送累加器
[00E97432]8432 [6D E2 20]: ADC $20E2 = #$00 @ 带进位加
[00E97435]8435 [8D D9 20]: STA $20D9 = #$00 @ 存累加器
[00E97438]8438 [18 AD DF]: CLC @ 清进位标志
[00E97439]8439 [AD DF 20]: LDA $20DF = #$81 @ 送累加器
[00E9743C]843C [6D DF 20]: ADC $20DF = #$81 @ 带进位加
[00E9743F]843F [8D DA 20]: STA $20DA = #$02 @ 存累加器
[00E97442]8442 [AD E0 20]: LDA $20E0 = #$00 @ 送累加器
[00E97445]8445 [6D E0 20]: ADC $20E0 = #$00 @ 带进位加
[00E97448]8448 [8D DB 20]: STA $20DB = #$01 @ 存累加器
[00E9744B]844B [18 AD DA]: CLC @ 清进位标志
[00E9744C]844C [AD DA 20]: LDA $20DA = #$02 @ 送累加器
[00E9744F]844F [6D D8 20]: ADC $20D8 = #$00 @ 带进位加
[00E97452]8452 [8D DA 20]: STA $20DA = #$02 @ 存累加器
[00E97455]8455 [AD DB 20]: LDA $20DB = #$01 @ 送累加器
[00E97458]8458 [6D D9 20]: ADC $20D9 = #$00 @ 带进位加
[00E9745B]845B [8D DB 20]: STA $20DB = #$01 @ 存累加器
[00E9745E]845E [AD ED 20]: LDA $20ED = #$0F @ 送累加器
[00E97461]8461 [8D DD 20]: STA $20DD = #$0F @ 存累加器
[00E97464]8464 [AD EE 20]: LDA $20EE = #$4A @ 送累加器
[00E97467]8467 [8D DE 20]: STA $20DE = #$4A @ 存累加器
[00E9746A]846A [AD DD 20]: LDA $20DD = #$0F @ 送累加器
[00E9746D]846D [CD EB 20]: CMP $20EB = #$90 @ 累加器与存储器比较
[00E97470]8470 [B0 20 AD]: BCS $8492 @ 进位为“1”分支
[00E97472]8472 [AD D7 20]: LDA $20D7 = #$00 @ 送累加器
[00E97475]8475 [C9 00 30]: CMP #$00 @ 累加器与存储器比较
[00E97477]8477 [30 1A EE]: BMI $8493 @ 结果为负分支
[00E97479]8479 [EE DD 20]: INC $20DD = #$10 @ 存储器加1
[00E9747C]847C [18 AD D6]: CLC @ 清进位标志
[00E9747D]847D [AD D6 20]: LDA $20D6 = #$81 @ 送累加器
[00E97480]8480 [6D D8 20]: ADC $20D8 = #$00 @ 带进位加
[00E97483]8483 [8D D6 20]: STA $20D6 = #$81 @ 存累加器
[00E97486]8486 [AD D7 20]: LDA $20D7 = #$00 @ 送累加器
[00E97489]8489 [6D D9 20]: ADC $20D9 = #$00 @ 带进位加
[00E9748C]848C [8D D7 20]: STA $20D7 = #$00 @ 存累加器
[00E9748F]848F [4C AC 84]: JMP $84AC @ 转移$00E974AC
[00E97492]8492 [60 EE DD]: RTS @ 子程序返回

[00E974AC]84AC [38 AD DE]: SEC @ 置进位标志
[00E974AD]84AD [AD DE 20]: LDA $20DE = #$4A @ 送累加器
[00E974B0]84B0 [ED EE 20]: SBC $20EE = #$4A @ 带借位的减法
[00E974B3]84B3 [8D D0 20]: STA $20D0 = #$00 @ 存累加器
[00E974B6]84B6 [38 AD DD]: SEC @ 置进位标志
[00E974B7]84B7 [AD DD 20]: LDA $20DD = #$10 @ 送累加器
[00E974BA]84BA [ED ED 20]: SBC $20ED = #$0F @ 带借位的减法
[00E974BD]84BD [8D CF 20]: STA $20CF = #$01 @ 存累加器
[00E974C0]84C0 [AD DC 20]: LDA $20DC = #$01 @ 送累加器
[00E974C3]84C3 [C9 01 F0]: CMP #$01 @ 累加器与存储器比较
[00E974C5]84C5 [F0 0F C9]: BEQ $84D6 @ 结果为0分支
[00E974C7]84C7 [C9 02 F0]: CMP #$02 @ 累加器与存储器比较
[00E974C9]84C9 [F0 1A C9]: BEQ $84E5 @ 结果为0分支
[00E974CB]84CB [C9 03 F0]: CMP #$03 @ 累加器与存储器比较
[00E974CD]84CD [F0 2D C9]: BEQ $84FC @ 结果为0分支

[00E974D6]84D6 [AD DD 20]: LDA $20DD = #$10 @ 送累加器
[00E974D9]84D9 [8D 81 20]: STA $2081 = #$10 @ 存累加器
[00E974DC]84DC [AD DE 20]: LDA $20DE = #$4A @ 送累加器
[00E974DF]84DF [8D 82 20]: STA $2082 = #$4A @ 存累加器
[00E974E2]84E2 [4C 23 85]: JMP $8523 @ 转移$00E97523

[00E974FC]84FC [18 AD ED]: CLC @ 清进位标志
[00E974FD]84FD [AD ED 20]: LDA $20ED = #$90 @ 送累加器
[00E97500]8500 [6D D0 20]: ADC $20D0 = #$00 @ 带进位加
[00E97503]8503 [8D 81 20]: STA $2081 = #$90 @ 存累加器
[00E97506]8506 [38 AD EE]: SEC @ 置进位标志
[00E97507]8507 [AD EE 20]: LDA $20EE = #$4A @ 送累加器
[00E9750A]850A [ED CF 20]: SBC $20CF = #$01 @ 带借位的减法
[00E9750D]850D [8D 82 20]: STA $2082 = #$49 @ 存累加器
[00E97510]8510 [4C 23 85]: JMP $8523 @ 转移$00E97523
[00E97523]8523 [20 3B 85]: JSR $853B @ 转子$00E9753B
[00E97526]8526 [4C 6A 84]: JMP $846A @ 转移$00E9746A

上一篇:文本挖掘-实战记录(二)基于NMF和LDA模型的文本关键词提取和文档聚类


下一篇:LeetCode刷题 1. Two Sum 两数之和 详解 C++语言实现 java语言实现