;------------------------------------------------------------------------
;
;		Copyright 2006 Intergraded Logic Systems
;                  Source Code is Copyright Stephen J. Carden
;
;
;			Please do not share this source!
;------------------------------------------------------------------------
;        title   'Drive programming Stuff'
;
;------------------------------------------------------------------------
;                              Wipedisk.s
;
;	Now an easy way to wipe an Atr just like a lowlevel format
;
;       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;------------------------------------------------------------------------
; Notes: o This source code MAY NOT be placed for download on any BBS's!
;        o "mea" is a macro that loads the address of the first field
;          into the pointer specified by the second field.
;------------------------------------------------------------------------
; Assembler:  MADMAC (tm) ST Cross Assembler (Atari Corp)
;             XASM   st and IBM VERSIONS
;------------------------------------------------------------------------
;=====================================================================

com_file_name:		.macro
;			dc.b   13,"filename.ext",$9b
			dc.b   12,"Wipedisk.com",$9b
			.endm

;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; File revision history. Version Number in hex
;
file_ver:		equ   $12
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; the Month in dec for the first time this revision 
;was compiled
;
c_month:		equ   8
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; the day in dec for the first time this revision 
;was compiled
c_day:			equ   26
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; the year in dec for the first time this revision 
;was compiled
c_year:			equ   2012
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; Type of compiler used in program
;
; 0 = unknown Compiler
; 1 = xasm
; 2 = mac_65
; 3 = basic
; 4 = compiled basic xl
; 5 = C65
; 6 = Action
;
; We can add more as time goes on!
;
;
xasm:			equ	1
mac_65:			equ	2 
basic:			equ	3
basicxl:		equ	4
c65:			equ	5
action:			equ	6

file_compiler:		equ	xasm
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; is this relocatable code ?
; anyother value other than 1 or 2 would be unknown
r..yes:			equ	1
r..no:			equ	2

;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; Gotta define if it can be relocated
l_relocatable:		equ	r..no
;
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; Gotta define it so I can print it
r..crl			equ	$7d
r..crlf			equ	$9b
r..space		equ	$20

l_frstscreenbyte:	equ	r..crl
;
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; The language the output file is in. 
;
;
; 0	=	Undifined
; 1	=	English
; 2	=	German
;
r..language:		equ	1
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


			.include	equates
			.include	globals
			.include	macros


			.org	$4000

win_start:
header_info:
			.include	header			; this reads info out of the header and displays to screen
			jmp	start



par_drv_letter:		dc.b	0
; 

cmdtab2:		ds.b	256

par_Name:		dc.b	0

buffer:			ds.b	256

buffer_1:		ds.b	256

sector_size:		dc.w	128	
srcdrv:			dc.b	8
dstdrv:			dc.b	8

heads:			dc.w	0
sector_per_trac:	dc.w	0
percom_density:		dc.w	0
real_sector_count:	dc.w	0
end_sector:		dc.w	0


sector_density:		dc.b	-1			; $ff = dd   $80 = sd

start_sector:		dc.w	0



xiov:			jmp	$ffff


start:

			LDY	#LBUF

.comp:			lda	(comtab),y
			cmp	#$9b
			beq	.exit
			cmp	#' '
			beq	.cont
			iny
			jmp	.comp


.exit:			jmp	ask_what_drive




.cont:
			iny
			iny
			LDA	(comtab),Y
			sta	par_drv_letter
			CMP	#'1'			;$2F
			bcc	.ea
			cmp	#'9'+1
			bcs	.ea
			jmp	.c

.ea:			jmp	ask_what_drive


.c:			ldx 	#$00
			iny				; going to jump pass Dn[:] /
			iny				; going to jump pass Dn:[ ]/

.d:			inx
.e:			iny
			lda	(comtab),y
			cmp	#'/'
			beq	.e
			cmp	#$20
			beq	.e
			cmp	#':'
			beq	.e
			cmp	#'Q'
			beq	.tam
			cmp	#$9b
			beq	.done_with_cli
			bne	.e
.tam
			sta	par_Name
;			jmp	.d

.done_with_cli:
			lda	par_drv_letter
			sbc	#48
			sta	srcdrv
								; may need to add percom to see the size of the drive

			jmp	start_it_now

exit_program:  
			LDA	#$9B
			JSR	echo
;			LDX	stack_save
;			TXS 
			RTS 
ask_what_drive:
			jsr	printsi
			dc.b	$9b," What drive Number to Wipe ? D",-1
			jsr	get_key
			sta	par_drv_letter
			jsr	upcase
			cmp	#'A'			; abort
			beq	.abort
			cmp	#'X'
			beq	.abort
			cmp	#$1c			;esc key
			beq	.abort
			cmp	#'E'			; Exit
			beq	.abort
			CMP	#'1'			;$2F
			bcc	error
			cmp	#'9'+1
			bcs	error
			lda	par_drv_letter
			jsr	echo
			jsr	printsi
			dc.b	":",-1
			lda	par_drv_letter
			sbc	#48
			sta	srcdrv
			jsr	printsi
			dc.b	$1c,$9c,-1
			jmp	start_it_now
.abort:
			jsr	printsi
			dc.b	$9b
			dc.b	" Operation Aborted!",$9b,-1
			lda	#$00
			sta	$2f0			; turn the cursor back on
			jsr	printsi
			dc.b	$9b,$9b,"All Done!",$9b,-1
			rts


error:
			JSR	printsi
			dc.b	$9b,"Wipedisk Dn:"
			dc.b	$9b
			dc.b	"Dn:   n= drive id  1 to 9",$9b,$9b
			dc.b	"Syntax =",$9b
			dc.b	"Wipedisk D8: "
			dc.b	"[Parm]",$9b
			dc.b	"[Parm] = /Q  will not give you a ",$9b
			dc.b	" 'are you Sure' message!" 
			dc.b	$9b,$9b,-1


			RTS 
;


start_it_now:
			lda	par_Name
			jsr	upcase
			cmp	#'Q'
			bne	.domsg
			jmp	.time_to_zero.drv
.domsg:
			jsr	printsi
			dc.b	$9b,$9b,$9b
			dc.b	<+128>,"This will completely wipe Drive >D"
			dc.b	-1

			lda	par_drv_letter
			eor	#$80
			jsr	echo
			jsr	printsi
			dc.b	<+128>,":<"			
			dc.b	$9b
			dc.b	<+128>,"with $00! Are you sure you want This?"
			dc.b	$9b," "
			dc.b	<+128>,"[y]"
			dc.b	"es "
			dc.b	<+128>,"[N]"
			dc.b	"o ?",-1
			jsr	get_key
			jsr	upcase
			cmp	#'Y'
			bne	.bye

			jsr	printsi
			dc.b	$9b,$9b
			dc.b	"Are you sure? WipeDisk D"
			dc.b	-1
			lda	par_drv_letter
			jsr	echo			


			jsr	printsi
			dc.b	":",$9b
			dc.b	<+128>,"[y]"
			dc.b	"es "
			dc.b	<+128>,"[N]"
			dc.b	"o ",-1
			jsr	get_key
			jsr	upcase
			cmp	#'Y'
			bne	.bye
			jsr	printsi
			dc.b	$9b,$9b,$9b,$9b,$9b,$9b

			dc.b	$1c,$1c,$1c,$1c,$1c,$1c,$1c,$1c,$1c,$1c
			dc.b	$9c,$9c,$9c,$9c,$9c,$9c,$9c,$9c,$9c,$9c

			dc.b	-1
			jmp	.time_to_zero.drv
.bye:
			jsr	printsi
			dc.b	$9b,$9b,$9b
			dc.b	<+128>,"Operation Aborted!"
			dc.b	$9b,-1
			jmp	.all_done

;------------------------------------
.time_to_zero.drv:
			lda	#low 0
			sta	start_sector
			lda	#high 0
			sta	start_sector
			ldy	#$00
			lda	#$00
.zero:			sta	buffer_1,y
			sta	cmdtab2,y
			iny
		 	cpy	#$00
			bne	.zero



			ldy	#$00
			lda	#$00
.b6c:			sta	buffer,y
			iny
			cpy	#$00
			bne	.b6c						
			ldx     #2
			ldy     #10
			jsr     gotoxy
			jsr	printsi
			dc.b	"Cleaning up Disk "
			dc.b	-1


			lda	#$00
			sta	start_sector
			sta	start_sector+1

			jsr	calc_sector_count
			lda	#$01
			sta	$2f0			; turn the cursor off


			jsr	.show_name

			jsr	run_loop

.all_done:
			lda	#$00
			sta	$2f0			; turn the cursor back on
			jsr	printsi
			dc.b	$9b,$9b,"All Done!",$9b,-1
			rts

.show_name:


			ldx     #2
			ldy     #13
			jsr     gotoxy
			jsr	printsi
			dc.b	"Your Current Partition Has '",-1
			LDA	end_sector
			SEC 
			SBC	# low 1
			STA	end_sector
			LDA	end_sector+1
			SBC	# high 1
			STA	end_sector+1

			lda	real_sector_count
			ldx	real_sector_count+1
			jsr	pr_card

			jsr	printsi
			dc.b	"'",$9b
			dc.b	"Sectors to fix!",-1




			rts


run_loop:	
			LDA	start_sector
			CLC 
			ADC	# low 1
			STA	start_sector
			LDA	start_sector+1
			ADC	# high 1
			STA	start_sector+1


			ldx	#2
			ldy	#20
			jsr	gotoxy
			jsr	printsi
			dc.b	"Writing Sector #",-1

			lda	start_sector
			ldx	start_sector+1

			jsr	pr_card

			lda	start_sector+1
			cmp	#$00
			bne	.do_256
			lda	start_sector
			cmp	#$03
			bcs	.do_256

			lda	#low 128
			sta	sector_size
			lda	#high 128
			sta	sector_size+1
			jmp	.do_rw


.do_256:		lda	#low 256
			sta	sector_size
			lda	#high 256
			sta	sector_size+1

.do_rw:
		 	jsr	read_write

			lda	start_sector+1
			cmp	real_sector_count+1	;end_sector+1
			bne	run_loop
			lda	start_sector
			cmp	real_sector_count	;end_sector
			bne	run_loop

			rts				; all done!






read_write:
;read
			lda 	#$31
			sta	$300
			lda	srcdrv
			sta	$301
			lda	#'R'				; read sector
			sta	$302				;dcomnd
			lda	#$40				;read cmd for sio or direction
			sta	$303   				;I think
			lda	#low buffer
			sta	dbuflo
			lda	#high buffer
			sta	dbufhi
			lda	sector_size
			sta	$308

			lda	sector_size+1
			sta	$309
			lda	start_sector
			sta	$30a				;low byte of sector number to read/write
			lda	start_sector+1
			sta	$30b				;hi byte
			jsr	do_r_siov			; read sector siov
			jmp	.write_it

.nowrt:			rts



.write_it
			lda 	#$31
			sta	$300
			lda     srcdrv
			sta	$301
			lda	#'W'				; Write sector
			sta	$302				;dcomnd
			lda	#$80				;read cmd for sio or direction
			sta	$303				;I think
			lda	#low buffer_1
			sta	dbuflo
			lda	#high buffer_1
			sta	dbufhi
			lda	sector_size
			sta	$308

			lda	sector_size+1
			sta	$309
			lda	start_sector
			sta	$30a				;low byte of sector number to read/write
			lda	start_sector+1
			sta	$30b				;hi byte
			jsr	do_w_siov			; write sector siov

			rts


do_r_siov:
			lda	#'R'				; read sector
			sta	$302				;dcomnd
			lda	#$40				;read cmd for sio or direction
			sta	$303				;I think
			jsr 	$e459
			lda	$303				;I think
			rts

do_w_siov:
			lda	#'W'				; Write sector
			sta	$302				;dcomnd
			lda	#$80				;read cmd for sio or direction
			sta	$303				;I think
			jsr 	$e459
			lda	$303				;I think
			rts


get_sector_count:
			lda	#$31
			sta	$300
			lda	srcdrv
			sta	$301
			lda	#'N'				;Lets ask Percom what it is
			sta	$0302
			lda	#$40
			sta	$0303
			lda	# low huh_data
			sta	$0304
			lda	# high huh_data
			sta	$0305
			lda	#$0c
			sta	$0308
			lda	#$00
			sta	$0309
			sta	$030a
			sta	$030b
			jsr	$e459
			lda	$0303
			cmp	#$01
			beq	.huh_1
			rts
.huh_1:
			lda 	consol
			cmp	#consol_select
			beq	.tam
			rts
.tam:
			jsr	printsi
			dc.b	$7d,$9b,$9b,$9b
			dc.b	"       Drive configuration table        ",$9B,$9B,$FF
			lda	huh_data
			jsr	sub_error
			jsr	printsi
			dc.b	"number of tracks",$9B,$FF
			lda	huh_data+1
			jsr	sub_error
			jsr	printsi
			dc.b	"Step rate! normaly 1",$9B,$FF
			lda	huh_data+2
			jsr	sub_error
			jsr	printsi
			dc.b	"Sector/Track high byte",$9B,$FF
			lda	huh_data+3
			jsr	sub_error
			jsr	printsi
			dc.b	"Sector/Track LOW byte",$9B,$FF
			lda	huh_data+4
			jsr	sub_error
			jsr	printsi
			dc.b	"Max head number",$9B,$FF
			lda	huh_data+5
			jsr	sub_error
			jsr	printsi
			dc.b	"Density -0=s, 4 double, 8 High",$9B,$FF
			lda	huh_data+6
			jsr	sub_error
			jsr	printsi
			dc.b	"Byte/sector h byte 1=256 0=128",$9B,$FF
			lda	huh_data+7
			jsr	sub_error
			jsr	printsi
			dc.b	"Byte/sector l byte 0=256 1=128",$9B,$FF
			lda	huh_data+8
			jsr	sub_error
			jsr	printsi
			dc.b	"Drive present flag -returns $ff",$9B,$FF
			lda	huh_data+9
			jsr	sub_error
			jsr	printsi
			dc.b	"not used",$9B,$FF
			lda	huh_data+10
			jsr	sub_error
			jsr	printsi
			dc.b	"not used",$9B,$FF
			lda	huh_data+11
			jsr	sub_error
			jsr	printsi
			dc.b	"not used",$9B
			dc.b	$9b,"Press any key to continue",$FF
			jsr	get_key
			lda	#$7d
			jsr	echo
			rts
sub_error:
			sta	.dan_k
			jsr	printsi
			dc.b	" $",$FF
			lda	.dan_k
			jsr	drive_error
			jsr	printsi
			dc.b	"  ",$FF
			rts
;
.dan_k:			dc.b	0
huh_data:		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
huh_data_d:		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0






calc_sector_count:
			jsr	get_sector_count
			lda	#$ff
			sta	sector_density
			lda	huh_data+5
			cmp	#$08
			bne	.a
			lda	#$02
			sta	percom_density
			jmp	.b
.a:			lda	#$01
			sta	percom_density
			lda	huh_data+5
			cmp	#$00
			bne	.b
			lda	#$80
			sta	sector_density

.b:
			lda	huh_data+2
			cmp	#$00
			bne	.c
			lda	huh_data+3
			cmp	#$00
			bne	.c
			lda	#$ff
			sta	huh_data+2
			sta	huh_data+3

.c:			lda	huh_data+2
			sta	sector_per_trac+1			
			lda	huh_data+3
			sta	sector_per_trac

			lda	huh_data
			cmp	#$03
			bcs	.d
			lda	# low 1
			sta	huh_data
.d:			lda	huh_data
			sta	heads
			lda	#$00
			sta	heads+1


			jsr	zfr0
			lda	heads
			sta	fr0
			lda	heads+1
			sta	fr0+1
			jsr	ifp
			lda	#$00
			sta	cix
			jsr	fmove
			lda	sector_per_trac
			sta	fr0
			lda	sector_per_trac+1
			sta	fr0+1
			lda	#$00
			sta	cix
			jsr	ifp
			jsr	fmult
			jsr	fmove
			lda	percom_density
			sta	fr0
			lda	percom_density+1
			sta	fr0+1
			lda	#$00
			sta	cix
			jsr	ifp
			jsr	fmult
			jsr	fpi
			lda	fr0
			ldx	fr0+1
			sta	real_sector_count
			stx	real_sector_count+1
			sta	end_sector
			stx	end_sector+1
			rts


		


gotoxy:			stx	85
			sty	84
			rts


;
;------------
; PRINT BYTE 
;------------
echo:
sprint:			sta	$b8
			lda	#$04
			sta	$034a
			stx	$b6
			sty	$b7
			ldx	#$06
			lda	$e400+1,x
			sta	$b3
			lda	$e400,x
			sta	$b2
			lda	$b8
			jsr	l88da
			ldx	$b6
			ldy	$b7
			lda	#$0c
			sta	$034a
			lda	$b8
			rts
;
l88da:			inc	$b2
			jmp	($b2)
			rts
;------------------------------
;   GET KEY  ROUTEEN           	
;this routeen get's one key and	
;return it to the accumlator  	
;------------------------------
;
get_key:		stx	$b6
			sty	$b7
			jsr	.a
			ldx	$b6
			ldy	$b7
			rts
.a:			lda	$e420+5
			pha
			lda	$e420+4
			pha
			rts
;
;-----------------------------
;CHANGES THE CHARTER TO UPCASE
;-----------------------------
upcase:
			cmp	#$61
			bcc	.a
			cmp	#$7a
			bcs	.a
			sbc	#$1f
.a:
			rts
;
;-----------------------------
;CHANGES THE CHARTER TO LOCASE
;-----------------------------
locase:
			cmp	#$41
			bcc	.a
			cmp	#$5a
			bcs	.a
			adc	#$1f
.a:
			rts
;
;----------------------------------
;    ERROR NUMBER                  
;this take's the value of the a reg
;and put a hex number to the screen
;----------------------------------
;
h_cardd:		dc.b	$00
;
; print a hex word value
; low byte in a reg x is high byte
;
h_card:			sta	h_cardd
			txa
			jsr	drive_error
			lda	h_cardd
			jsr	drive_error
			rts
;
;
drive_error:		pha
			lsr
			lsr
			lsr
			lsr
			jsr	.a
			pla
			and	#$0f
.a:			cmp	#$0a
			bcs	.b
			ora	#$30
			bne	.c
.b:			adc	#$36
.c:			jsr	sprint
			rts
;
;
;----------------------------
;   jsr  printsi             	
;this prints an inline string	
;     terminated by $ff     	
;----------------------------
;        jsr   prints
;       dc.b	"print this",$9B,$FF
echosi:
printsi:		pla
			sta	pstr+1
			pla
			sta	pstr+2
prsl:			inc	pstr+1
			bne	pstr
			inc	pstr+2
pstr:			lda	$ffff
			cmp	#$ff
			beq	estri
			jsr	fast_output
			jmp	prsl
estri:			lda	pstr+2
			pha
			lda	pstr+1
			pha
			rts
;
;-------------------------
;actual screen handler    
;screen offset definitions
;-------------------------
scr_offset:		dc.w	0
			dc.w	40
			dc.w	80
			dc.w	120
			dc.w	160
			dc.w	200
			dc.w	240
			dc.w	280
			dc.w	320
			dc.w	360
			dc.w	400
			dc.w	440
			dc.w	480
			dc.w	520
			dc.w	560
			dc.w	600
			dc.w	640
			dc.w	680
			dc.w	720
			dc.w	760
			dc.w	800
			dc.w	840
			dc.w	880
			dc.w	920
;
fast_output:
			sta	$5a
			lda	sc.redirect
			cmp	#print_p
			beq	.go_cio
.leo:
			lda 	$02ff   	; CONTROL 1 FLAG
			cmp 	#$00
			bne 	.leo

			lda	$5a
			cmp	#32
			bcc	.do_look
			cmp	#125
			bcc	.do_here
.do_look:		ldy	#0
.lookup:		lda	.char_table,y
			beq	.do_here
			cmp	$5a
			beq	.go_cio
			iny
			bne	.lookup


.go_cio:		lda	$5a
			jmp	putlocal


.do_here:		ldy	#0
			lda	$5d
			sta	($5e),y
			lda	$5a
			cmp	#$9b
			beq	.docr
.notcr:			jsr	.get_adr
			lda	$5a
			and	#$7f
			cmp	#32
			bcc	.add64
			cmp	#96
			bcc	.sub32
			jmp	.asis
.add64:			clc
			adc	#64
			jmp	.asis
.sub32:			sec
			sbc	#32
.asis:			bit	$5a
			bpl	.xxlate
			ora	#$80
.xxlate:		ldy	#0
			sta	($5e),y
			inc	$55
			inc	$63
			lda	$55
			cmp	#40
			bcs	.next_row
			iny
			lda	($5e),y
			sta	$5d
			ora	#$80
			ldx	752
			bne	.nocurs1
			sta	($5e),y
.nocurs1:		inc	$5e
			bne	.nooav
			inc	$5e+1
.nooav:			rts
.docr:			lda	#0
			sta	$63
.next_row:		lda	$52
			sta	$55
			inc	$54
			ldy	$54
			cpy	#24
			bcs	.scroll
			jsr	.get_adr
			ldy	#0
			lda	($5e),y
			sta	$5d
			ldx	752
			bne	.nocurs2
			ora	#$80
			sta	($5e),y
.nocurs2:		rts

.scroll:		dec	$54
			lda	$58
			sta	$68
			clc
			adc	#40
			sta	$5e
			lda	$58+1
			sta	$68+1
			adc	#0
			sta	$5e+1
			ldy	#0
			ldx	#3
.scloop:		lda	($5e),y
			sta	($68),y
			iny
			bne	.scloop
			inc	$5e+1
			inc	$68+1
			dex
			bne	.scloop
.scloop2:		lda	($5e),y
			sta	($68),y
			iny
			cpy	#152
			bcc	.scloop2
			lda	$58
			clc
			adc	#920&$ff
			sta	$5e
			lda	$58+1
			adc	#920/256
			sta	$5e+1
			ldy	#0
			tya
.clear:			sta	($5e),y
			iny
			cpy	#40
			bcc	.clear
			ldx	752
			bne	.nocurs3
			lda	#$80
			ldy	$55
			sta	($5e),y
.nocurs3:		lda	#0
			sta	$5d
			lda	$5e
			clc
			adc	$55
			sta	$5e
			lda	$5e+1
			adc	#0
			sta	$5e+1
			rts
.get_adr:		lda	$54
			asl
			tay
			lda	$58
			clc
			adc	scr_offset,y
			sta	$5e
			lda	$58+1
			adc	scr_offset+1,y
			sta	$5e+1
			lda	$5e
			clc
			adc	$55
			sta	$5e
			lda	$5e+1
			adc	#0
			sta	$5e+1
			rts
.char_table:
			dc.b	27,28,29,30,31,125,126,127
			dc.b	156,157,158,159,253,254,255,0


putlocal:		ldx	#11
			stx	$0342
			ldx	#0
			stx	$0348
			stx	$0349
			jmp	$e456
;



pr_byte:
			ldx	#$00
pr_card:
			sta	$d4
			stx	$d4+1
			lda	#$00
			sta	$f2
			jsr	$d9aa
			jsr	$d8e6
			ldy	#$00
.aprbloop:
			lda	($f3),y
			php
			and	#$7f
			iny
			jsr	echo
			plp
			bpl	.aprbloop
			rts

;
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;  help menu section
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help_menu:
			.include	notice

			rts
;

win_end:		ds.b	0
;
;
