From 57c20d1aca457b0017d326f07ca85ef3d578755d Mon Sep 17 00:00:00 2001 From: tilleul Date: Thu, 16 Apr 2020 21:35:37 +0200 Subject: [PATCH] Update SCRN_PLOT_your_sound_routine.md --- .../the art of 2-liners/SCRN_PLOT_your_sound_routine.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/2liners/the art of 2-liners/SCRN_PLOT_your_sound_routine.md b/2liners/the art of 2-liners/SCRN_PLOT_your_sound_routine.md index 9a680ba..27bf3c3 100644 --- a/2liners/the art of 2-liners/SCRN_PLOT_your_sound_routine.md +++ b/2liners/the art of 2-liners/SCRN_PLOT_your_sound_routine.md @@ -1,5 +1,12 @@ # SCRN/PLOT your 6502/ASM sound routine (or any other) -This aricle will explain a new (?) technique to poke ASM (machine language) subroutines using Applesoft (without using POKEs at ALL) and actually spare several characters if you're into 2-liners. +This article will explain a new (?) technique to poke ASM (machine language) subroutines using Applesoft (without using POKEs at ALL) and actually spare several characters if you're into 2-liners. + +## 6502 Subroutines in 2-liners +Because 2-liners have to be short (maximum 239 characters per line of code), 6502 subroutines are usually short too. These routines might solve in a few bytes complex problems like generating a tune, scrolling a graphics screen or do a repetitive task best handled by machine code. + +Most of the time these routines are called using the ``CALL`` statement and if it takes parameters those are ``POKE``d beforehand. + +Because every character count, sometimes it's best to create "&" routines ## Generating various sounds in 2-liners. Using a sound generating routine, we are going to see different techniques to interface assembly routines with Applesoft in the context of 2-liners.