• R/O
  • HTTP
  • SSH
  • HTTPS

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Motorola M6800 (6800) Exorciser / SWTPC emulator plus 6801 instruction set emulation


File Info

Rev. 92ef8a291a6240887b19ec9117ea774aba59ea9a
Größe 1,356 Bytes
Zeit 2022-09-03 00:57:21
Autor Joel Matthew Rees
Log Message

Fixing the embarrassing CPX bug -- C flag, etc.

Content

	OPT PRT
	OPT 6801

	ORG $80
N	RMB 4
DPTBL	RMB 4

	ORG $A0
USTARS	TSX		dodge return address
	LDD	2,X	multiplier
	STD	N
	LDD	4,X	multiplicand
	STD	N+2
	LDA B	N	multiplier high
	MUL
	STD	2,X	result high cell
	LDA B	N+1	multiplier low
	LDA A	N+3	multiplicand low
	MUL
	STD	4,X	result low cell
	LDA B	N+1	multiplier low
	LDA A	N+2	multiplicand high
	MUL		inner 1
	ADDD	3,X
	STD	3,X
	BCC	USTAS2
	INC	2,X
USTAS2	LDA B	N	multiplier high
	LDA A	N+3	multiplicand low
	MUL		inner 2
	ADDD	3,X
	STD	3,X
	BCC	USTASD
	INC	2,X
USTASD	RTS	


STKSZ	EQU $80
GLOBALSZ	EQU $10


	ORG $220
	FCC "help me, I think I'm falling into the sea."
	FCC "wouldn't want to go there by myself, that's such a lonely place to be."

	ORG $340
	FCB 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31



	ORG $7800
GLOBAL	RMB GLOBALSZ

	ORG $8000
RAMBAR	EQU *

	ORG $100
START	LDS #RAMBAR-STKSZ
	LDX #$188
	PSHX
	LDAB #167
	ABX
	NOP
	LDD 3,X
	BRN START
	LDD #$1234
	ADDD #$FEDC
	SUBD #$FEDC
	LDAA #10
	LDAB #25
	MUL
	PSHB
	PSHA
	LDD #1001
	PSHB
	PSHA
	JSR USTARS
	TSX
	LDD 0,X
	LSRD
	STD 0,X
	ROR 2,X
	ROR 3,X
	LDD 2,X
	ASLD
	ROL 1,X
	ROL 0,X
	STD 2,X
	SUBD 0,X
	LDX 4,X
	LDAB #$F8
	ABX
	LDAB #96
	ABX
	LDAA $11,X
	INX
	INX
	INX
	INX
	INX
	CMPA 12,X
	BNE STOP
	NOP
	CPX #$345
	INS
	INS
	INS
	INS
	PULX
	CPX #$345
	BCC START
	NOP
	NOP
STOP	WAIT



	ORG START