Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jedeoric committed Dec 6, 2023
1 parent a4b4b79 commit f0999f9
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 31 deletions.
13 changes: 0 additions & 13 deletions src/commands/banks.asm
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,17 @@
XMAINARGS = $2C
XGETARGV = $2E



lda #$01
sta bank_all_banks_display

lda #$00 ; return args with cut
BRK_KERNEL XMAINARGS

initmainargs bank_save_argvlow, bank_save_argc, 0


cpx #$01
beq @jmp_displays_all_banks


getmainarg #1, (bank_save_argvlow)

; ldx #$01
; lda bank_save_argvlow
; ldy bank_save_argvhigh

; BRK_KERNEL XGETARGV

sta ptr3
sty ptr3+1

Expand Down Expand Up @@ -483,7 +471,6 @@ str_kernel_reserved:
.byte "Kernel reserved",$0D,$0A,$00
.endproc


;unsigned char twil_get_registers_from_id_bank(unsigned char bank);
.proc _twil_get_registers_from_id_bank
cmp #$00
Expand Down
1 change: 1 addition & 0 deletions src/commands/basic11.asm
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ copy_bufedt:
initmainargs basic11_ptr1, basic11_ptr4, 1

ldy #$00

@copy_bufedt:
lda (basic11_ptr1),y
beq @end_copy_bufedt
Expand Down
15 changes: 2 additions & 13 deletions src/commands/cat.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,12 @@
XMAINARGS = $2C
XGETARGV = $2E

lda #$00 ; return args with cut
BRK_KERNEL XMAINARGS

sta cat_save_argvlow
sty cat_save_argvhigh
stx cat_save_argc

initmainargs cat_save_argvlow, cat_save_argc, 0
cpx #$01
beq @print_usage


ldx #$01 ; get arg
lda cat_save_argvlow
ldy cat_save_argvhigh
BRK_KERNEL XGETARGV


getmainarg #1, (cat_save_argvlow)
sta cat_save_ptr_arg
sty cat_save_ptr_arg+1

Expand Down
5 changes: 4 additions & 1 deletion src/commands/cd.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
cd_path_2 := userzp+6

; Let's malloc
MALLOC(KERNEL_MAX_PATH_LENGTH)
malloc #KERNEL_MAX_PATH_LENGTH
cmp #NULL
bne @not_null_1
cpy #NULL
bne @not_null_1
print str_oom
rts

@not_null_1:
sta cd_path
sty cd_path+1
Expand All @@ -38,9 +39,11 @@
inc cd_argv1_ptr
bne @skip30
inc cd_argv1_ptr+1

@skip30:
iny
bne @get_first_arg

@found_eos:
mfree(cd_path)
rts
Expand Down
9 changes: 5 additions & 4 deletions src/commands/cp.asm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ continue2:
jmp @copy_finished

@continue_to_write:

fwrite (MALLOC_PTR1), (cp_mv_fp_dest_nb_bytes), 1, cp_mv_fp_dest
jmp @loop_until_eof

Expand All @@ -128,9 +127,11 @@ continue2:
lda cp_tmp
beq @out

lda cp_mv_rm_save_argv_ptr2
ldx cp_mv_rm_save_argv_ptr2+1
BRK_KERNEL XRM
unlink cp_mv_rm_save_argv_ptr2

; lda cp_mv_rm_save_argv_ptr2
; ldx cp_mv_rm_save_argv_ptr2+1
; BRK_KERNEL XRM
; now remove file

@out:
Expand Down
5 changes: 5 additions & 0 deletions tests/unit-tests/commands.sub
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ setfont
#twil
uname
viewhrs

cp started started.cop
cp started testmv
cp testmv.mv

touch stopped

0 comments on commit f0999f9

Please sign in to comment.