;
;	>>> SillyPack - Centment by JAC! <<<
;
;	Note: DISK XL V1.0 runs at $a006 & $a470
;	Write $500-$9fff to Centment-$0500-$9fff.bin
;	Pack Centment-$0500-$9fff.bin with Exomizer, depack=$a000,buffer=$a1000
;
;	@com.wudsn.ide.asm.outputfile=CENTMENT.xex

	opt h+
	org $2000
	.byte 'Centment -  DOS compatible XEX version by JAC! on 2014-03-03',$9b

	opt h-

	ins "Centment-$0500-$9fff-Packed-$2000.dat"

	opt h+
	
	org $80				;Use ZP to not break fast loaders

	.proc main
	jsr $2000			;Unpack
	mva #1 580			;Force coldstart as this will kill DOS
	jmp $1000
	.endp

	run main


;Load User Memory: $136 sectors to $0500 (-$9fff)
;
;A386: A9 00             LDA #$00
;A388: 85 FC             STA FLPTR
;A38A: A9 05             LDA #$05
;A38C: 85 FD             STA $FD
;A38E: A9 01             LDA #$01
;A390: 8D 85 04          STA $0485
;A393: A9 36             LDA #$36
;A395: 8D 84 04          STA $0484
;A398: AD DD BB          LDA $BBDD
;A39B: 18                CLC
;A39C: 6D 81 04          ADC $0481
;A39F: C9 03             CMP #$03
;A3A1: 90 03             BCC $A3A6
;A3A3: 38                SEC
;A3A4: E9 03             SBC #$03
;A3A6: AA        LA3A6   TAX
;A3A7: BD 6A A2          LDA $A26A,X
;A3AA: 8D 83 04          STA $0483
;A3AD: BD 6D A2          LDA $A26D,X
;A3B0: 8D 82 04          STA $0482
;A3B3: A9 52     LA3B3   LDA #$52
;A3B5: 20 BA A0          JSR $A0BA
;A3B8: 30 F9             BMI $A3B3
;A3BA: A0 7F             LDY #$7F
;A3BC: B9 00 04  LA3BC   LDA $0400,Y
;A3BF: 91 FC             STA (FLPTR),Y
;A3C1: 88                DEY
;A3C2: 10 F8             BPL $A3BC
;A3C4: EE 82 04          INC $0482
;A3C7: D0 03             BNE $A3CC
;A3C9: EE 83 04          INC $0483
;A3CC: A5 FC     LA3CC   LDA FLPTR
;A3CE: 18                CLC
;A3CF: 69 80             ADC #$80
;A3D1: 85 FC             STA FLPTR
;A3D3: 90 02             BCC $A3D7
;A3D5: E6 FD             INC $FD
;A3D7: AD 84 04  LA3D7   LDA $0484
;A3DA: 38                SEC
;A3DB: E9 01             SBC #$01
;A3DD: 8D 84 04          STA $0484
;A3E0: B0 03             BCS $A3E5
;A3E2: CE 85 04          DEC $0485
;A3E5: 0D 85 04  LA3E5   ORA $0485
;A3E8: D0 C9             BNE $A3B3
;A3EA: 60                RTS