Jump anywhere: Difference between revisions

Jump anywhere en Yabasic
(Jump anywhere en BASIC256)
(Jump anywhere en Yabasic)
Line 378:
=={{header|BASIC256}}==
BASIC256 supports both <code>goto</code> and <code>gosub</code>.
{{works with|QBasic}}
{{works with|Yabasic}}
<lang freebasic>print "First line."
Line 2,887:
[./jump line 17] in new(_) block argument
</pre>
 
=={{header|Yabasic}}==
Yabasic supports both <code>goto</code> and <code>gosub</code>.
{{works with|QBasic}}
{{works with|BASIC256}}
<lang freebasic>print "First line."
gosub sub1
print "Fifth line."
goto Ending
 
sub1:
print "Second line."
gosub sub2
print "Fourth line."
return
 
Ending:
print "We're just about done..."
goto Finished
 
sub2:
print "Third line."
return
 
Finished:
print "... with goto and gosub, thankfully."
end</lang>
{{out}}
<pre>Igual que la entrada de FutureBasic.</pre>
 
=={{header|Z80 Assembly}}==
Like the 6502, the Z80 can access the entire address space of the CPU. There are no page faults, segfaults, or W^X protections on the Z80 - anything the program counter "sees" will be executed as code. Writes to read-only memory are silently ignored for the most part, but certain machines such as the Game Boy use runtime writes to ROM as a means of bankswitching, so you'll need to be familiar with your computer's documentation.
2,130

edits