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

Go to the source code of this file.

Functions

void blit_define (Environment *_environment, char *_name, int _sop, int _mop, int _smop, int _iop, int _dop, int _idop, int _top)
 Emit ASM code for BLIT IMAGE [image] AT [int],[int].
void blit_define_begin_compound (Environment *_environment, char *_name)
void blit_define_compound_operand_to_register (Environment *_environment, int _register, int _source)
void blit_define_compound_unary (Environment *_environment, int _operation, int _operand, int _result)
void blit_define_compound_binary (Environment *_environment, int _operation, int _operand1, int _operand2, int _result)
void blit_define_end_compound (Environment *_environment, int _result)

Variables

char DATATYPE_AS_STRING [][16]
 Emit code for BEGIN COPPER.

Function Documentation

◆ blit_define()

void blit_define ( Environment * _environment,
char * _name,
int _sop,
int _mop,
int _smop,
int _iop,
int _dop,
int _idop,
int _top )

Emit ASM code for BLIT IMAGE [image] AT [int],[int].

This function outputs a code that draws an image on a bitmap.

Parameters
_environmentCurrent calling environment
_imageImage to draw
_xAbscissa of the point to draw
_yOrdinate of the point

Definition at line 196 of file blit_define.c.

◆ blit_define_begin_compound()

void blit_define_begin_compound ( Environment * _environment,
char * _name )

Definition at line 242 of file blit_define.c.

◆ blit_define_compound_binary()

void blit_define_compound_binary ( Environment * _environment,
int _operation,
int _operand1,
int _operand2,
int _result )

Definition at line 279 of file blit_define.c.

◆ blit_define_compound_operand_to_register()

void blit_define_compound_operand_to_register ( Environment * _environment,
int _register,
int _source )

Definition at line 264 of file blit_define.c.

◆ blit_define_compound_unary()

void blit_define_compound_unary ( Environment * _environment,
int _operation,
int _operand,
int _result )

Definition at line 273 of file blit_define.c.

◆ blit_define_end_compound()

void blit_define_end_compound ( Environment * _environment,
int _result )

Definition at line 285 of file blit_define.c.

Variable Documentation

◆ DATATYPE_AS_STRING

char DATATYPE_AS_STRING[][16]
extern

Emit code for BEGIN COPPER.

This variable defines as an array of constant pointers. Each element of the array represents the "human" name of a ugBASIC's data type. The main reason is to map an IDto a readable string. If ugBASIC encounters an error, you don't want it to print "Error in type 2," but rather "Error in type FLOAT.". Note that it's vital that the order of strings in the array exactly reflects the order of the IDs in your enum. If you move an element to one, you must also move it to the other, otherwise the mapping will be staggered. Often, a final NULL or UNKNOWN string is added to handle error cases or to allow you to loop through the array without knowing its size beforehand.

Definition at line 133 of file _infrastructure.c.