Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add example one_billion.3bc #399

Open
RodrigoDornelles opened this issue Apr 13, 2023 · 0 comments
Open

add example one_billion.3bc #399

RodrigoDornelles opened this issue Apr 13, 2023 · 0 comments
Assignees
Labels
examples how to use 3bc language

Comments

@RodrigoDornelles
Copy link
Owner

#!/usr/bin/env 3bc

# Branch 5
MODE NILL 0d06
ALOC 0x05 100
NILL NILL 0x05

# Branch 4
MODE NILL 0d06
ALOC 0x04 100
NILL NILL 0x04

# Branch 3
MODE NILL 0d06
ALOC 0x03 100
NILL NILL 0x03

# Branch 2
MODE NILL 0d06
ALOC 0x02 100
NILL NILL 0x02

# Branch 1
MODE NILL 0d6
ALOC 0x01 100
NILL NILL 0x01
MODE NILL 0d08
PUSH 0x01 NILL
MODE NILL 0d12
MATH NILL 1
MODE NILL 0d08
PULL 0x01 0
MODE NILL 9
FGTO NILL 0x1

# Branch 2
MODE NILL 0d08
PUSH 0x02 NILL
MODE NILL 0d12
MATH NILL 1
MODE NILL 0d08
PULL 0x02 0
MODE NILL 9
FGTO NILL 0x02

# Branch 3
MODE NILL 0d08
PUSH 0x03 NILL
MODE NILL 0d12
MATH NILL 1
MODE NILL 0d08
PULL 0x03 0
MODE NILL 9
FGTO NILL 0x03

# Branch 4
MODE NILL 0d08
PUSH 0x04 NILL
MODE NILL 0d12
MATH NILL 1
MODE NILL 0d08
PULL 0x04 0
MODE NILL 9
FGTO NILL 0x04

# Branch 5
MODE NILL 0d08
PUSH 0x05 NILL
MODE NILL 0d12
MATH NILL 1
MODE NILL 0d08
PULL 0x05 0
MODE NILL 9
FGTO NILL 0x05

# Finish!
MODE NILL 0d02
STRC NILL 'O'
STRC NILL 'K'
STRC NILL '!'
STRC NILL '\n'
@RodrigoDornelles RodrigoDornelles added the examples how to use 3bc language label Apr 13, 2023
@RodrigoDornelles RodrigoDornelles self-assigned this Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples how to use 3bc language
Projects
None yet
Development

No branches or pull requests

1 participant