Comments (4)
I made workaround for my VBI
procedure here: https://github.com/zbyti/simple-games-easy-for-develop/blob/master/Mad%20Pascal/snake/src/game.inc
from mad-pascal.
procedure vbi; keep;
begin
if not game_over then begin
update_time;
snake_step;
if not fruit_on_board then put_fruit;
if time_bcd = TIME_THOLD then game_over := true;
end;
end;
//o-------------------------------------------------------------o
procedure prepare;
begin
Move(pointer(CRT_CHARS_ADR), pointer(CHARSET_ADR), CHARSET_SIZE);
Move(pointer(CRT_TITLE_ADR), pointer(SCREEN_ADR), SCREEN_SIZE);
{*
hack for the compiler, call vbi procedure
in other case optimizer remove unused - from his point of view - code
vbi;
*}
end;
MadPascal/samples/vic-20/snake$ make
rm -f output/* bin/*
/home/zbyti/Programs/MadPascal/mp src/vic20.pas -t raw -code A009 -o output/vic20.a65
Mad Pascal Compiler version 1.6.6 [2022/04/12] for 6502
Compiling src/vic20.pas
src/vic20.pas (12) Note: Local const 'GAME_BLACK' not used
src/vic20.pas (14) Note: Local const 'GAME_RED' not used
src/vic20.pas (15) Note: Local const 'GAME_CYAN' not used
src/vic20.pas (16) Note: Local const 'GAME_PURPLE' not used
src/vic20.pas (18) Note: Local const 'GAME_BLUE' not used
src/vic20.pas (20) Note: Local const 'GAME_ORANGE' not used
src/game.inc (69) Note: Local absolutevar 'SF0B' not used
src/game.inc (70) Note: Local absolutevar 'SF1B' not used
49 lines compiled, 0.81 sec, 8017 tokens, 627 idents, 217 blocks, 6 types
8 note(s) issued
/home/zbyti/Programs/mads/mads output/vic20.a65 -x -i:/home/zbyti/Programs/MadPascal/base -o:output/vic20-core.bin
ZPAGE: $0000..$0053
RTLIB: $A07C..$A113
SYSTEM: $A12D..$A143
SYS_VIC20: $A144..$A28E
CODE: $A00C..$A548
DATA: $A55C..$A55E
$R RCDATA $B912..$BBFF 'res/title_cbm.scr'
$R RCDATA $BC00..$BFFF 'res/snake_cbm.fnt'
.local +MAIN.UPDATE_TIME
vic20.a65 (1238) ERROR: Undeclared label MAIN.UPDATE_TIME (BANK=0)
.local +MAIN.SNAKE_STEP
vic20.a65 (1244) ERROR: Undeclared label MAIN.SNAKE_STEP (BANK=0)
m@INLINE
vic20.a65 (1239) ERROR: Undeclared macro M@INLINE (BANK=0)
vic20.a65 (1245) ERROR: Undeclared macro M@INLINE (BANK=0)
jsr PUT_FRUIT
vic20.a65 (1252) ERROR: Undeclared label PUT_FRUIT (BANK=0)
Writing listing file...
make: *** [makefile:11: build-vic20] Error 2
from mad-pascal.
from mad-pascal.
from mad-pascal.
Related Issues (20)
- Arithmetic on pointer passed by variable should not affect data HOT 2
- using the `fdiv` variable name when dividing with floating point `float` / `single` causes a hangup HOT 2
- The `inline` modifier in a nested function throws a compilation error in MADS HOT 1
- Unit compilation error HOT 4
- Unable to reuse the MPT player with another music file. HOT 1
- Feature: Direct parameter reference of functions and procedures.
- [feature request] Default parameter
- MP incorrectly generates a reference to a variable placed in the library, which causes a MADS compilation error. HOT 3
- [BUG] Access violation HOT 2
- Path normalization is an issue under linux when capital letters are used in path. HOT 1
- Compiler directives $info $warning $error not working as expected
- Determining the location (in memory) for STATICDATA
- The compiller requires write access to library files for compilation (?) HOT 2
- Incorrect algorithm in the prime numbers calculation benchmarks HOT 2
- [Feature] ORGIN directive HOT 1
- [Optimizing] Extra jump to the correct part of the procedure when there are sub-functions in the function/procedure. HOT 3
- Adding brackets to object function yields unhandled exception? HOT 1
- BUG: benchmark suite is broken now HOT 1
- Unable to copy nested record of record passed as pointer HOT 2
- Unable to cast pointer on the left side of assignment HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mad-pascal.