News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

symbol after and symbol with asm for cpc

Started by funkheld, 17:27, 05 October 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

funkheld


Hi good afternoon.
how do you plaese :
symbol after and symbol with asm?


Thank you.
greeting

GeoffB17

It would be a help if you gave an example of what you're referring to.

In ASM, a symbol can refer to a number of things.   It could be a LABEL within a program, which could be an address.  It could be a CONSTANT value, or it could refer to a variable (which could be then used either as a value, or an address, or both).

Good practice suggests that you should define a symbol before it it is used.   Often the first using is sufficient to define.

Geoff

SRS

Guess you search for:

call &BBa8 TXT SET MATRIX
and
call &bbab TXT SET M TABLE

funkheld


thanks for the information.


how does that look as an asm process when you call the whole thing?


with parameter transfer?


greeting

Bryce


AMSDOS




Wouldn't it be better to understand how BASIC handles it?


Like Assembly, BASIC can redefine the characters with a Symbol After. The trap in BASIC is MEMORY because by Default SYMBOL AFTER 240 is applied, if MEMORY is used, any further SYMBOL AFTER will result in Improper Argument error. The fix is SYMBOL AFTER 256 before MEMORY, HIMEM from Memory can be set anywhere and then SYMBOL AFTER num, the number set actually alters HIMEM, so for example when I set use 4 characters with SYMBOL AFTER 252, if I want my Redefined Table at &8000, I will have MEMORY &7FFF+(8*4) or MEMORY &7FFF+32 and then I POKE my Redefined Data. This is how Assembly would handle it.
* Using the old Amstrad Languages :D * And create my own ;)
* Incorporating the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

SRS

A search on CPCWIKI gives sourcecode for that:
https://www.cpcwiki.eu/index.php/Programming:Coding_a_simple_BASIC_game_into_Assembly
which can also be found via asking google.


AMSDOS

Quote from: SRS on 19:54, 06 October 20
A search on CPCWIKI gives sourcecode for that:
https://www.cpcwiki.eu/index.php/Programming:Coding_a_simple_BASIC_game_into_Assembly
which can also be found via asking google.


Ha! I wrote that one just to see how well Assembly handled the Multicoloured Redefined Characters with the transparent mode.  :D


I also made an example which is in the Pinned Example Z80 assembly programs thread, which is another example from an early ACU Machine Code article, though they were using the BASIC SYMBOL to redefine the characters which I converted into Assembly. The only catch with it, is it assumes SYMBOL AFTER 240 has been applied.
* Using the old Amstrad Languages :D * And create my own ;)
* Incorporating the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Powered by SMFPacks Menu Editor Mod