This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filename=$1 | |
filename="${filename%.*}" | |
echo "Filename without extension is ${filename}" | |
echo -n "Compiling $1 with vasm... " &&\ | |
vasmx86_std -m8086 $1 -Faout -o ${filename}.obj &&\ | |
echo "done." | |
echo -n "Linking $1 with vlink... " &&\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;----------------------------------------- | |
; Adapted from the original Lisa ROM listing | |
; https://www.apple.asimov.net/documentation/applelisa/AppleLisa-BootROMListing.pdf | |
; D0 = desired frequency ($00 - $AA) | |
; D1 = duration (0 = .5 msec) | |
; D2 = volume (0,2,4,...,E) | |
; D3 = pulse train shape as a string of 8 bits | |
;----------------------------------------- | |
ORG $800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROGRAM sound; | |
USES HWINT; | |
var i:integer; | |
begin | |
SetVolume(2); | |
noise(3000); | |
for i:= 1 to 600 do | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROGRAM sound; | |
USES HWINT; | |
PROCEDURE Delay(milli: MilliSeconds); | |
VAR old: MilliSeconds; | |
BEGIN | |
old := Timer; | |
repeat | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROGRAM sound; | |
USES HWINT; | |
BEGIN | |
Beep(3000, 5000); | |
END. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void loop() { | |
digitalWrite(D0, LOW); | |
digitalWrite(D1, LOW); | |
digitalWrite(D2, LOW); | |
delay(2); | |
digitalWrite(D0, LOW); | |
digitalWrite(D1, LOW); | |
digitalWrite(D2, HIGH); | |
delay(2); | |
; (...end so on...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// send a pattern to Shift Register (e.g. 01100101) | |
digitalWrite(D7, LOW); | |
digitalWrite(D6, HIGH); | |
digitalWrite(D5, HIGH); | |
digitalWrite(D4, LOW); | |
digitalWrite(D3, LOW); | |
digitalWrite(D2, HIGH); | |
digitalWrite(D1, LOW); | |
digitalWrite(D0, HIGH); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const byte D0 = 44; // Digital Line 0 | |
const byte D1 = 45; // Digital Line 1 | |
const byte D2 = 46; // Digital Line 2 | |
void setup() { | |
pinMode(D0, OUTPUT); | |
pinMode(D1, OUTPUT); | |
pinMode(D2, OUTPUT); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define Arduino pin constants to correspond with MOS6522 pins | |
const byte CS1 = 24; // Chip Select 1 | |
const byte CS2 = 23; // Chip Select 2 | |
const byte RS0 = 38; // Register Select 0 | |
const byte RS1 = 37; // Register Select 1 | |
const byte RS2 = 36; // Register Select 2 | |
const byte RS3 = 35; // Register Select 3 | |
const byte RW = 22; // Read-Write Line | |
const byte D0 = 33; // Data Bus 0 | |
const byte D1 = 32; // Data Bus 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define Arduino pin constants to correspond with MOS6522 pins | |
const byte CS1 = 24; // Chip Select 1 | |
const byte CS2 = 23; // Chip Select 2 | |
const byte RS0 = 38; // Register Select 0 | |
const byte RS1 = 37; // Register Select 1 | |
const byte RS2 = 36; // Register Select 2 | |
const byte RS3 = 35; // Register Select 3 | |
const byte RW = 22; // Read-Write Line | |
const byte D0 = 33; // Data Bus 0 | |
const byte D1 = 32; // Data Bus 1 |
NewerOlder