Skip to content

Commit

Permalink
tab updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sijnstra committed Jan 23, 2024
1 parent a33e664 commit 5c0235e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions romdisk/expr.asm
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ expr_main:
; Retrieve the number given as a parameter
inc hl
inc hl ; skip the first pointer
ld e,(hl) ;grab 2nd pointer
ld e,(hl) ;grab 2nd pointer
inc hl
ld d,(hl)
ex de,hl ;pointer in HL
ex de,hl ;pointer in HL
; Check that argc is at least 2 (command itself is part of argc)
; This may need to change in future as we allow to evaluate full expressions
ld a, c
Expand All @@ -45,8 +45,8 @@ expr_main:
jp nz, _expr_do_string ;can only be string related function now

_expr_do_math:
call parse_int ;strutils - accepts 16 bit dec or hex input at HL
or a ;0 is ok, 1 is overflow, 2 is bad digit
call parse_int ;strutils - accepts 16 bit dec or hex input at HL
or a ;0 is ok, 1 is overflow, 2 is bad digit
jr nz,_expr_usage
; Routine displaying the value of HL in decimal then hex
Expand Down Expand Up @@ -97,14 +97,14 @@ _expr_do_string:
jr nz, _expr_usage
ld a,(hl)
cp 'l'
jr nz,_expr_error ;it's not the 'length' command so invalid parameter.
ex de,hl ;hl back to pointer table
inc hl ; we didn't inc before
ld e,(hl) ;grab 3rd pointer
jr nz,_expr_error ;it's not the 'length' command so invalid parameter.
ex de,hl ;hl back to pointer table
inc hl ; we didn't inc before
ld e,(hl) ;grab 3rd pointer
inc hl
ld d,(hl)
ex de,hl ;pointer in HL
call strlen ;returns answer in BC
ex de,hl ;pointer in HL
call strlen ;returns answer in BC
ld h,b
ld l,c
jp _expr_print_result
Expand Down

0 comments on commit 5c0235e

Please sign in to comment.