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

Go to the source code of this file.

Functions

void screen_horizontal_scroll (Environment *_environment, int _displacement)
 Emit ASM code for SCREEN HORIZONTAL SCROLL [int]x.
void screen_horizontal_scroll_var (Environment *_environment, char *_displacement)
 Emit ASM code for SCREEN HORIZONTAL SCROLL [expression[.

Function Documentation

◆ screen_horizontal_scroll()

void screen_horizontal_scroll ( Environment * _environment,
int _displacement )

Emit ASM code for SCREEN HORIZONTAL SCROLL [int]x.

This function outputs an assembly code capable of performing a hardware scroll of the screen. The scroll is always in the direction from right to left, so with a _displacement of 0 the screen is exactly as it would be without scrolling while with the value 7 you would have a scroll of 7 pixels to left. This version is used when a direct integer is used.

Parameters
_environmentCurrent calling environment
_displacementHorizontal offset in pixels (0-7)

Definition at line 53 of file screen_horizontal_scroll.c.

◆ screen_horizontal_scroll_var()

void screen_horizontal_scroll_var ( Environment * _environment,
char * _displacement )

Emit ASM code for SCREEN HORIZONTAL SCROLL [expression[.

This function outputs an assembly code capable of performing a hardware scroll of the screen. The scroll is always in the direction from right to left, so with a _displacement of 0 the screen is exactly as it would be without scrolling while with the value 7 you would have a scroll of 7 pixels to left. This version is used when an expression is used.

Parameters
_environmentCurrent calling environment
_displacementHorizontal offset in pixels (0-7)

Definition at line 73 of file screen_horizontal_scroll.c.