Changes

Source Codes

1,718 bytes added, 18:55, 28 October 2023
Add link to 'A Survey of Advanced Assembly Language Programming Techniques on the MOS 6502 and Zilog Z80'
*[[Z80_-_undocumented_opcodes|Z80 - undocumented opcodes]]
*[[Where to learn?]]
*[[A little optimization for Z80 Assembler]]
*[https://github.com/sebastiengoutal/publications/blob/cae9abe5d684f98912571e4e713fc7af5f70760c/A%20Survey%20of%20Advanced%20Assembly%20Language%20Programming%20Techniques%20on%20the%20MOS%206502%20and%20Zilog%20Z80.pdf A publication on advanced assembly programming techniques on the Z80]
== Algorithms ==
*[[Programming:Square Root|Square Root]]
*[[Programming:Precalculated square|Precalculated square]]
*[[Programming:Maze generation|Maze generation]]
*[[Programming:Random Number Generator|Random Number Generator]]
*[[Programming:Reverse A|Reverse A]]
*[[Programming:An example to read a file byte-by-byte|An example to read a file byte-by-byte]]
*[[Programming:An example to write a file byte-by-byte|An example to write a file byte-by-byte]]
*[[Programming:Read/Write a file quickly byte-by-byte|Read or write a file quickly byte-by-byte]]
*[[Programming:A simple file copier using firmware functions (copies byte-by-byte)|A simple file copier using firmware functions (copies byte-by-byte)]]
*[[Programming:Loading a file|Loading a file]]
*[[Programming:Reading and writing the boot sector of a SYSTEM/VENDOR disc|Reading and writing the boot sector of a SYSTEM/VENDOR disc]]
*[[Programming:Writing a sector to disc|Writing a sector to disc]]
 
== Games ==
*[[Programming:Coding a simple BASIC game into Assembly]]
== Graphics ==
 
*[[Programming:Calculating xpos,ypos to screen address in assembly|Calculating xpos,ypos to screen address]]
*[[Programming:Display a 8-bit number in binary|Display a 8-bit number in binary]]
*[[Programming:Display a 8-bit number in hex|Display a 8-bit number in hex]]
*[[Programming:Fast Sprites|Fast Sprites]] by [[User:Executioner|Executioner]]
*[[Programming:Fast Textoutput|Fast Textoutput]] by [[Prodatron]]
*[[Fastest_Character_Print_in_Mode_2|Fastest Character Print in Mode 2 in all screen positions]] by [[FG Brain]]
*[[Programming:Hardware scrolling|Hardware Scrolling]] by [[User:Executioner|Executioner]]
*[[Programming:Hardware scrolling 2|Hardware Scrolling 2]]
== Keyboard ==
*[[Programming:Keyboard scanning|Keyboard scanning]]
*[[Programming:Keyboard_redefinition|Keyboard redefinition]]
 
== Cartridges ==
*[[Programming:Cartridges|Cartridges]]
*[[Programming:Crt0Cart|CRT0 for SDCC]] to init a CPR cart
== Other routines ==
*[[Programming:Dumping the data of BASIC or AMSDOS or an expansion rom|Dumping the data of BASIC or AMSDOS or an expansion rom]]
*[[Programming:Dumping the data of the lower rom|Dumping the data of the lower rom]]
*[[Programming:Storing and Retrieving Screens from the extra 64kb|Storing and Retrieving Screens from the extra 64kb]]
== Sound ==
* Memory range for programs is &0040-&a700. This avoids firmware and memory allocated by AMSDOS disc ROM.
This is safe for the purpose of loading and being compatible with the firmware.
After loading, if you disable the firmware, you can re-use the firmware areas as you want, but you need to do everything yourself (scanning keyboard, drawing, sound etc).If you need to use these areas, a common thing to do is to load most into the safe area, some into the screen, and relocate it after loading.
* Programs on cassette and disc have a header that define the load address, length and execution address.
*Firmware refreshes the palette every 50th of a second, so you need to turn off the firmware and use the hardware directly, or set the colours using firmware.
*Firmware can be "turned off", by disabling lower ROM, redirecting interrupts and not calling firmware functions.
*Screen can be resized the same as the Spectrum. Provided you do not use hardware scrolling, this gives you extra space although because of the layout of the screen, it's not continuous, it's in 8 seperate blocks, but it's enough to store data and code.
1
edit