User Tools

Site Tools


sd:getting_stuff_done_in_assembly_language

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sd:getting_stuff_done_in_assembly_language [2026/06/01 13:07] appledogsd:getting_stuff_done_in_assembly_language [2026/06/01 14:44] (current) appledog
Line 524: Line 524:
 Randomly, in the middle of nowhere, we will explain to you; yes, you can play music in your game. Our PLAY statement is multi-voice; please see the relevant documentation for more information. For now, here's a short little ditty reminiscent of England in the summer of the 1600's. Randomly, in the middle of nowhere, we will explain to you; yes, you can play music in your game. Our PLAY statement is multi-voice; please see the relevant documentation for more information. For now, here's a short little ditty reminiscent of England in the summer of the 1600's.
  
 +<codify BASIC>
 +10 PLAY "XV1 MN W5 XP3000 O4 L4 T180"
 +15 PLAY "XV2 MN W5 XP3500 O3 L4 T180"
 +20 PLAY "XV1 F1"
 +25 PLAY "XV2 R1"
 +30 PLAY "XV1 A4. B-8 > C4 C4 <"
 +35 PLAY "XV2 R1"
 +40 PLAY "XV1 B-4 A4 G4 F4"
 +45 PLAY "XV2 R1"
 +50 PLAY "XV1 > C2 C4. C8 <"
 +55 PLAY "XV2 R2 F4. F8"
 +60 PLAY "XV1 > C4 D2 C4 <"
 +65 PLAY "XV2 F4 < B-2 A4"
 +70 PLAY "XV1 B-4 A4 G4 G4"
 +75 PLAY "XV2 B-4 F4 > C4 C4"
 +80 PLAY "XV1 A1"
 +85 PLAY "XV2 < F1"
 +</codify>
  
 +Now you may wonder, why incorporate a BASIC example? Here, we can use BASIC to quickly test musical ideas. When it's time to put them into a game, we do this:
 +
 +<codify armasm>
 +; Example 10: Music
 +
 +.address $C000
 +
 +    LDELM @fair_phyllis
 +    LDAH $52        ; Play Song
 +    INT $11
 +    RET
 +
 +fair_phyllis:
 +    .bytes "XV1 MN W5 XP3000 O4 L4 T180"
 +    .bytes "XV2 MN W5 XP3500 O3 L4 T180"
 +    .bytes "XV1 F1 "
 +    .bytes "XV2 R1 "
 +    .bytes "XV1 A4. B-8 > C4 C4 < "
 +    .bytes "XV2 R1 "
 +    .bytes "XV1 B-4 A4 G4 F4 "
 +    .bytes "XV2 R1 "
 +    .bytes "XV1 > C2 C4. C8 < "
 +    .bytes "XV2 R2 F4. F8 "
 +    .bytes "XV1 > C4 D2 C4 < "
 +    .bytes "XV2 F4 < B-2 A4 "
 +    .bytes "XV1 B-4 A4 G4 G4 "
 +    .bytes "XV2 B-4 F4 > C4 C4 "
 +    .bytes "XV1 A1 "
 +    .bytes "XV2 < F1", 0
 +</codify>
sd/getting_stuff_done_in_assembly_language.1780319220.txt.gz · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki