ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
on_goto.c File Reference
#include "../../ugbc.h"

Go to the source code of this file.

Functions

void on_goto (Environment *_environment, char *_expression)
 Emit ASM code for ON ... GOTO ....
void on_goto_index (Environment *_environment, char *_label)
 Emit ASM code for ... (of ON ... GOTO ...).
void on_goto_number (Environment *_environment, int _number)
 Emit ASM code for ... (of ON ... GOTO ...).
void on_goto_end (Environment *_environment)
 Emit ASM code for ... (of ON ... GOTO ...).

Function Documentation

◆ on_goto()

void on_goto ( Environment * _environment,
char * _expression )

Emit ASM code for ON ... GOTO ....

This function outputs the code to implement the conditional jump by expression.

Parameters
_environmentCurrent calling environment
_expressionExpression with the true / false condition

Definition at line 79 of file on_goto.c.

◆ on_goto_end()

void on_goto_end ( Environment * _environment)

Emit ASM code for ... (of ON ... GOTO ...).

This function outputs the code to implement the ending of unconditional jump by expression.

Parameters
_environmentCurrent calling environment

Definition at line 164 of file on_goto.c.

◆ on_goto_index()

void on_goto_index ( Environment * _environment,
char * _label )

Emit ASM code for ... (of ON ... GOTO ...).

This function outputs the code to implement any specific indexed jump on forced jumps by expression.

Parameters
_environmentCurrent calling environment
_labelLabel to jump to

Definition at line 105 of file on_goto.c.

◆ on_goto_number()

void on_goto_number ( Environment * _environment,
int _number )

Emit ASM code for ... (of ON ... GOTO ...).

This function outputs the code to implement any specific indexed jump on forced jumps by expression.

Parameters
_environmentCurrent calling environment
_numberLine number to jump to

Definition at line 146 of file on_goto.c.