Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
gforth
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bernd Paysan
gforth
Commits
c5c4fc5d
Verified
Commit
c5c4fc5d
authored
Jul 16, 2017
by
Bernd Paysan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cross.fs needs $@
parent
9170f59c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
cross.fs
cross.fs
+29
-0
No files found.
cross.fs
View file @
c5c4fc5d
...
@@ -215,6 +215,35 @@ Create bases 10 , 2 , A , 100 ,
...
@@ -215,6 +215,35 @@ Create bases 10 , 2 , A , 100 ,
[
IFUNDEF
]
$@
[
IFUNDEF
]
$@
:
$@
@
dup
IF
dup
cell
+
swap
@
ELSE
0
THEN
;
:
$@
@
dup
IF
dup
cell
+
swap
@
ELSE
0
THEN
;
[
THEN
]
[
THEN
]
[
IFUNDEF
]
>
stack
:
$@
len
(
$
addr
--
u
)
\
gforth
-
string
string
-
fetch
-
len
\
G
returns
the
length
of
the
stored
string
.
@
dup
IF
@
THEN
;
:
>
pow2
(
n
--
pow2
)
1
-
dup
2
/
or
\
next
power
of
2
dup
2
rshift
or
dup
4
rshift
or
dup
8
rshift
or
dup
#
16
rshift
or
[
cell
8
=
[
IF
]
]
dup
#
32
rshift
or
[
[
THEN
]
]
1
+
;
:
$
padding
(
n
--
n'
)
\
gforth
-
string
[
6
cells
]
Literal
+
>
pow2
[
-
4
cells
]
Literal
and
;
:
$!
len
(
u
$
addr
--
)
\
gforth
-
string
string
-
store
-
len
\
G
changes
the
length
of
the
stored
string
.
Therefore
we
must
\
G
change
the
memory
area
and
adjust
address
and
count
cell
as
\
G
well
.
over
$
padding
over
@
IF
\
fast
path
for
unneeded
size
change
over
@
@
$
padding
over
=
IF
drop
@
!
EXIT
THEN
THEN
over
@
swap
resize
throw
over
!
@
!
;
:
>
stack
(
x
stack
--
)
\
G
push
to
top
of
stack
>
r
r
@
$@
len
cell
+
r
@
$!
len
r
>
$@
+
cell
-
!
;
[
THEN
]
>
CROSS
>
CROSS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment