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

Go to the source code of this file.

Functions

void mmove_memory_memory (Environment *_environment, char *_from, char *_to, char *_size)
 Emit ASM code for MMOVE [expr] TO [expr] SIZE [expr].
void mmove_memory_video (Environment *_environment, char *_from, char *_to, char *_size)
 Emit ASM code for MMOVE {VIDEO} [expr] TO {VIDEO} [expr] SIZE [expr].
void mmove_video_memory (Environment *_environment, char *_from, char *_to, char *_size)
 Emit ASM code for MMOVE {VIDEO} [expr] TO {VIDEO} [expr] SIZE [expr].

Variables

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

Function Documentation

◆ mmove_memory_memory()

void mmove_memory_memory ( Environment * _environment,
char * _from,
char * _to,
char * _size )

Emit ASM code for MMOVE [expr] TO [expr] SIZE [expr].

This function outputs a code that move a tile on a tilemap.

Parameters
_environmentCurrent calling environment
_fromSource address to move from
_toDestination address to move to
_sizeSize of the memory to move

Definition at line 53 of file mmove.c.

◆ mmove_memory_video()

void mmove_memory_video ( Environment * _environment,
char * _from,
char * _to,
char * _size )

Emit ASM code for MMOVE {VIDEO} [expr] TO {VIDEO} [expr] SIZE [expr].

This function outputs a code that move a tile on a tilemap.

Parameters
_environmentCurrent calling environment
_fromSource address to move from
_toDestination address to move to
_sizeSize of the memory to move

Definition at line 77 of file mmove.c.

◆ mmove_video_memory()

void mmove_video_memory ( Environment * _environment,
char * _from,
char * _to,
char * _size )

Emit ASM code for MMOVE {VIDEO} [expr] TO {VIDEO} [expr] SIZE [expr].

This function outputs a code that move a tile on a tilemap.

Parameters
_environmentCurrent calling environment
_fromSource address to move from
_toDestination address to move to
_sizeSize of the memory to move

Definition at line 101 of file mmove.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.