Skip to content

Commit

Permalink
decimal number modifier &
Browse files Browse the repository at this point in the history
  • Loading branch information
TG9541 committed Dec 18, 2016
1 parent a3aa40c commit 087fd32
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion C0135/globconf.inc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
WORDS_EXTRASTACK = 0 ; Link/include stack core words: rp@ rp! sp! sp@ DEPTH
WORDS_EXTRADEBUG = 0 ; Extra debug words: SEE
WORDS_EXTRACORE = 0 ; Extra core words: =0 I
WORDS_EXTRACORE = 1 ; Extra core words: =0 I
WORDS_EXTRAMEM = 0 ; Extra memory words: BSR 2C@ 2C!
WORDS_EXTRAEEPR = 1 ; Extra EEPROM lock/unlock words: LOCK ULOCK
WORDS_HWREG = 0 ; Peripheral Register words
Expand Down
2 changes: 1 addition & 1 deletion MINDEV/globconf.inc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
WORDS_EXTRASTACK = 0 ; Link/include stack core words: rp@ rp! sp! sp@ DEPTH
WORDS_EXTRADEBUG = 0 ; Extra debug words: SEE
WORDS_EXTRACORE = 0 ; Extra core words: =0 I
WORDS_EXTRACORE = 1 ; Extra core words: =0 I
WORDS_EXTRAMEM = 1 ; Extra memory words: BSR 2C@ 2C!
WORDS_EXTRAEEPR = 1 ; Extra EEPROM lock/unlock words: LOCK ULOCK
WORDS_HWREG = 0 ; Peripheral Register words
Expand Down
2 changes: 1 addition & 1 deletion W1209/globconf.inc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

WORDS_EXTRASTACK = 0 ; Link/include stack core words: rp@ rp! sp! sp@ DEPTH
WORDS_EXTRADEBUG = 0 ; Extra debug words: SEE
WORDS_EXTRACORE = 0 ; Extra core words: =0 I
WORDS_EXTRACORE = 1 ; Extra core words: =0 I
WORDS_EXTRAMEM = 0 ; Extra memory words: BSR 2C@ 2C!
WORDS_EXTRAEEPR = 1 ; Extra EEPROM lock/unlock words: LOCK ULOCK
WORDS_HWREG = 0 ; Peripheral Register words
Expand Down
16 changes: 10 additions & 6 deletions forth.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2755,6 +2755,12 @@ NUMQ0:
MOV USRBASE+1,#2
JRA NUMQSKIP
2$:
CP A,#('&')
JRNE 3$
MOV USRBASE+1,#10
CALL DECIM
JRA NUMQSKIP
3$:
.endif
CP A,#('-')
JRNE NUMQ1
Expand All @@ -2766,10 +2772,9 @@ NUMQSKIP:
CALL ONEP
CALL SWAPP
CALL ONEM
JRA NUMQ0
JRNE NUMQ0 ; check for more modifiers

NUMQ1:

CALL QDUP
CALL QBRAN
.dw NUMQ6
Expand All @@ -2795,7 +2800,7 @@ NUMQ2: CALL DUPP
CALL DONXT
.dw NUMQ2

CALL DROP ; drop b
CALLR NUMDROP ; drop b

LD A,(1,SP) ; test sign flag
JRPL NUMPLUS
Expand All @@ -2813,10 +2818,9 @@ NUMQ5:
; fall through
NUMQ6:
POP A ; sign flag
CALL DROP

POP USRBASE+1 ; restore BASE
RET
NUMDROP:
JP DROP


; Basic I/O
Expand Down

0 comments on commit 087fd32

Please sign in to comment.