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

Continue with the next instruction if On..Goto/Gosub is out of bounds. #39

Merged
merged 1 commit into from
Sep 30, 2018

Conversation

pauwell
Copy link
Collaborator

@pauwell pauwell commented Sep 29, 2018

Now, if the ip is undefined and therefore no label was found, the program returns to the previous address and continues with the next instruction.

curop += 'if(ip == undefined){ sp -= 8; ip = i[sp>>2]; }\n';

@googlebot googlebot added the cla: yes Manually check off CLA label Sep 29, 2018
@trn1ty
Copy link

trn1ty commented Sep 29, 2018

I don't know the code but I really love the concept.

curop += '][((' + name + ')|0) - 1]] || ip;\n';
if (isGosub) {
curop += '][((' + name + ')|0) - 1]];\n';
curop += 'if(ip == undefined){ sp -= 8; ip = i[sp>>2]; }\n';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever :-)

@flagxor flagxor merged commit 9a58453 into google:master Sep 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Manually check off CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants