From f3127397261af0546fb4bf5217e14d64a4db9f9e Mon Sep 17 00:00:00 2001 From: dtremblay Date: Wed, 6 Jan 2021 23:26:38 -0400 Subject: [PATCH] Release 0.5.4.1 --------------- Fixed a bug in the SBC when using a 16-bit accumulator. Removed the "Open Hex File (w/o Zeroing)" - the option was confusing. Removed the silly blue border around the GPU control. Fixed loading of breakpoints with the Foenix XML file. --- FoenixIDETester/CpuTests.cs | 46 + Main/FoenixSystem.cs | 45 +- Main/Processor/Operations.cs | 10 +- Main/Properties/AssemblyInfo.cs | 4 +- Main/UI/CPUWindow.cs | 29 + Main/UI/MainWindow.Designer.cs | 78 +- Main/UI/MainWindow.cs | 40 +- Release Notes.txt | 7 + bin/Release/FoenixIDE.exe | Bin 377856 -> 376832 bytes bin/Release/roms/kernel.hex | 731 +-- bin/Release/roms/kernel.lst | 10110 +++++++++++++++--------------- 11 files changed, 5555 insertions(+), 5545 deletions(-) diff --git a/FoenixIDETester/CpuTests.cs b/FoenixIDETester/CpuTests.cs index e59e016..e267a91 100644 --- a/FoenixIDETester/CpuTests.cs +++ b/FoenixIDETester/CpuTests.cs @@ -608,5 +608,51 @@ public void TestOverflowSBC9() Assert.IsTrue(cpu.Flags.Carry, "Carry should be true"); Assert.IsTrue(cpu.Flags.oVerflow, "Overflow should be true"); } + + /** + * Error reported by Phil + * CLC + * XCE + * REP #$30 + * + * SEC + * LDA #$AA + * SBC #$78 + * + * Carry should be set + */ + [TestMethod] + public void TestOverflowSBC10() + { + ClearCarry(); + MemMgr.RAM.WriteByte(cpu.PC, OpcodeList.XCE_Implied); + cpu.ExecuteNext(); + Assert.IsFalse(cpu.Flags.Emulation); + Assert.IsTrue(cpu.Flags.Carry); + + // REP #$30 + MemMgr.RAM.WriteByte(cpu.PC, OpcodeList.REP_Immediate); + MemMgr.RAM.WriteByte(cpu.PC + 1, 0x30); + cpu.ExecuteNext(); + + Assert.AreEqual(2, cpu.A.Width); + Assert.AreEqual(2, cpu.X.Width); + + // SEC + MemMgr.RAM.WriteByte(cpu.PC, OpcodeList.SEC_Implied); + + // LDA #$AA + MemMgr.RAM.WriteByte(cpu.PC, OpcodeList.LDA_Immediate); + MemMgr.RAM.WriteWord(cpu.PC + 1, 0xAA); + cpu.ExecuteNext(); + + MemMgr.RAM.WriteByte(cpu.PC, OpcodeList.SBC_Immediate); + MemMgr.RAM.WriteWord(cpu.PC + 1, 0x78); + cpu.ExecuteNext(); + + Assert.AreEqual(0x32, cpu.A.Value); + Assert.IsTrue(cpu.Flags.Carry, "Carry should be true"); + Assert.IsFalse(cpu.Flags.oVerflow, "Overflow should be false"); + } } } diff --git a/Main/FoenixSystem.cs b/Main/FoenixSystem.cs index 6f5b881..7630f82 100644 --- a/Main/FoenixSystem.cs +++ b/Main/FoenixSystem.cs @@ -16,7 +16,6 @@ public class FoenixSystem { public MemoryManager MemMgr = null; public Processor.CPU CPU = null; - public Gpu gpu = null; public ResourceChecker Resources; public Processor.Breakpoints Breakpoints = new Processor.Breakpoints(); @@ -25,9 +24,8 @@ public class FoenixSystem public SortedList WatchList = new SortedList(); private string LoadedKernel; - public FoenixSystem(Gpu gpu, BoardVersion version, string DefaultKernel) + public FoenixSystem(BoardVersion version, string DefaultKernel) { - this.gpu = gpu; boardVersion = version; int memSize = MemoryMap.RAM_SIZE; @@ -72,18 +70,12 @@ public FoenixSystem(Gpu gpu, BoardVersion version, string DefaultKernel) // Assign memory variables used by other processes CPU = new CPU(MemMgr); - CPU.SimulatorCommand += CPU_SimulatorCommand; - gpu.VRAM = MemMgr.VIDEO; - gpu.RAM = MemMgr.RAM; - gpu.VICKY = MemMgr.VICKY; + MemMgr.VDMA.setVideoRam(MemMgr.VIDEO); MemMgr.VDMA.setSystemRam(MemMgr.RAM); // Load the kernel.hex if present - ResetCPU(true, DefaultKernel); - - // This fontset is loaded just in case the kernel doesn't provide one. - gpu.LoadFontSet("Foenix", @"Resources\Bm437_PhoenixEGA_8x8.bin", 0, CharacterSet.CharTypeCodes.ASCII_PET, CharacterSet.SizeCodes.Size8x8); + ResetCPU(DefaultKernel); // Write bytes $9F in the joystick registers to mean that they are not installed. MemMgr.WriteWord(0xAFE800, 0x9F9F); @@ -93,18 +85,6 @@ public FoenixSystem(Gpu gpu, BoardVersion version, string DefaultKernel) MemMgr.TIMER2.TimerInterruptDelegate += TimerEvent2; } - private void CPU_SimulatorCommand(int EventID) - { - switch (EventID) - { - case SimulatorCommands.RefreshDisplay: - gpu.BlinkingCounter = Gpu.BLINK_RATE; - break; - default: - break; - } - } - private void TimerEvent0() { byte mask = MemMgr.ReadByte(MemoryLocations.MemoryMap.INT_MASK_REG0); @@ -151,7 +131,7 @@ public void SetVersion(BoardVersion rev) boardVersion = rev; } // return true if the CPU was reset and the program was loaded - public bool ResetCPU(bool ResetMemory, string kernelFilename) + public bool ResetCPU(string kernelFilename) { if (CPU != null) { @@ -159,8 +139,6 @@ public bool ResetCPU(bool ResetMemory, string kernelFilename) //CPU.Halt(); } - gpu.Refresh(); - if (kernelFilename != null) { LoadedKernel = kernelFilename; @@ -182,19 +160,15 @@ public bool ResetCPU(bool ResetMemory, string kernelFilename) } else { - if (ResetMemory) - { - this.ResetMemory(); - } LoadedKernel = HexFile.Load(MemMgr.RAM, LoadedKernel, BasePageAddress, out _, out _); if (LoadedKernel != null) { - if (ResetMemory) + if (lstFile == null) { lstFile = new ListFile(LoadedKernel); } else - { + { // TODO: This results in lines of code to be shown in incorrect order - Fix ListFile tempList = new ListFile(LoadedKernel); foreach (DebugLine line in tempList.Lines.Values) @@ -204,14 +178,13 @@ public bool ResetCPU(bool ResetMemory, string kernelFilename) lstFile.Lines.Remove(line.PC); } lstFile.Lines.Add(line.PC, line); - for (int i=1; i < line.commandLength; i++) + for (int i = 1; i < line.commandLength; i++) { - if (lstFile.Lines.ContainsKey(line.PC+i)) + if (lstFile.Lines.ContainsKey(line.PC + i)) { - lstFile.Lines.Remove(line.PC+i); + lstFile.Lines.Remove(line.PC + i); } } - } } } diff --git a/Main/Processor/Operations.cs b/Main/Processor/Operations.cs index 96e0066..4cc862e 100644 --- a/Main/Processor/Operations.cs +++ b/Main/Processor/Operations.cs @@ -1031,7 +1031,15 @@ public void ExecuteSBC(byte instruction, AddressModes addressMode, int signature nv = cpu.A.Value - val - 1 + cpu.Flags.CarryBit; cpu.Flags.Carry = (nv >= 0 && nv <= cpu.A.MaxUnsigned); - cpu.Flags.oVerflow = ((cpu.A.Value ^ nv) & ((256 - val) ^ nv) & 0x80) != 0; + if (cpu.A.Width == 1) + { + cpu.Flags.oVerflow = ((cpu.A.Value ^ nv) & ((256 - val) ^ nv) & 0x80) != 0; + } + else + { + cpu.Flags.oVerflow = ((cpu.A.Value ^ nv) & ((65536 - val) ^ nv) & 0x8000) != 0; + } + cpu.Flags.SetNZ(nv, cpu.A.Width); cpu.A.Value = nv; diff --git a/Main/Properties/AssemblyInfo.cs b/Main/Properties/AssemblyInfo.cs index 4304133..681e8c2 100644 --- a/Main/Properties/AssemblyInfo.cs +++ b/Main/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.5.4.0")] -[assembly: AssemblyFileVersion("0.5.4.0")] +[assembly: AssemblyVersion("0.5.4.1")] +[assembly: AssemblyFileVersion("0.5.4.1")] diff --git a/Main/UI/CPUWindow.cs b/Main/UI/CPUWindow.cs index 673f467..bcd3f8f 100644 --- a/Main/UI/CPUWindow.cs +++ b/Main/UI/CPUWindow.cs @@ -46,6 +46,21 @@ public void SetKernel(FoenixSystem kernel) MemoryLimit = kernel.MemMgr.RAM.Length; registerDisplay1.CPU = kernel.CPU; knl_breakpoints = kernel.Breakpoints; + if (knl_breakpoints.Count > 0) + { + BPLabel.Text = knl_breakpoints.Count.ToString() + " BP"; + // Update the combo + foreach (KeyValuePair kvp in knl_breakpoints) + { + BPCombo.Items.Add(kvp.Value); + UpdateDebugLines(kvp.Key, true); + } + } + else + { + BPLabel.Text = "Breakpoint"; + } + UpdateQueue(); int pc = kernel.CPU.PC; DebugLine line = GetExecutionInstruction(pc); @@ -608,6 +623,20 @@ public void ExecuteStep() (BreakOnIRQCheckBox.Checked && (kernel.CPU.Pins.GetInterruptPinActive && InterruptMatchesCheckboxes()) ) ) { + if (kernel.CPU.CurrentOpcode.Value == 0) + { + if (lastLine.InvokeRequired) + { + lastLine.Invoke((MethodInvoker)delegate + { + lastLine.Text = "BRK OpCode read"; + }); + } + else + { + lastLine.Text = "BRK OpCode read"; + } + } if (UpdateTraceTimer.Enabled || kernel.CPU.CurrentOpcode.Value == 0) { UpdateTraceTimer.Enabled = false; diff --git a/Main/UI/MainWindow.Designer.cs b/Main/UI/MainWindow.Designer.cs index 6f66a00..a8f8a36 100644 --- a/Main/UI/MainWindow.Designer.cs +++ b/Main/UI/MainWindow.Designer.cs @@ -43,7 +43,6 @@ private void InitializeComponent() this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuOpenHexFile = new System.Windows.Forms.ToolStripMenuItem(); - this.openHexFileWoZeroingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.loadFNXMLFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveProjectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.loadWatchListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -69,10 +68,6 @@ private void InitializeComponent() this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.checkForUpdateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.panel1 = new System.Windows.Forms.Panel(); - this.panel2 = new System.Windows.Forms.Panel(); - this.panel3 = new System.Windows.Forms.Panel(); - this.panel4 = new System.Windows.Forms.Panel(); this.Tooltip = new System.Windows.Forms.ToolTip(this.components); this.gpu = new FoenixIDE.Display.Gpu(); this.statusStrip1.SuspendLayout(); @@ -203,7 +198,6 @@ private void InitializeComponent() // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuOpenHexFile, - this.openHexFileWoZeroingToolStripMenuItem, this.loadFNXMLFileToolStripMenuItem, this.saveProjectToolStripMenuItem, this.loadWatchListToolStripMenuItem, @@ -216,49 +210,42 @@ private void InitializeComponent() // menuOpenHexFile // this.menuOpenHexFile.Name = "menuOpenHexFile"; - this.menuOpenHexFile.Size = new System.Drawing.Size(216, 22); + this.menuOpenHexFile.Size = new System.Drawing.Size(167, 22); this.menuOpenHexFile.Text = "&Open Hex File"; this.menuOpenHexFile.Click += new System.EventHandler(this.MenuOpenHexFile_Click); // - // openHexFileWoZeroingToolStripMenuItem - // - this.openHexFileWoZeroingToolStripMenuItem.Name = "openHexFileWoZeroingToolStripMenuItem"; - this.openHexFileWoZeroingToolStripMenuItem.Size = new System.Drawing.Size(216, 22); - this.openHexFileWoZeroingToolStripMenuItem.Text = "Open Hex File w/o &Zeroing"; - this.openHexFileWoZeroingToolStripMenuItem.Click += new System.EventHandler(this.MenuOpenHexFile_Click); - // // loadFNXMLFileToolStripMenuItem // this.loadFNXMLFileToolStripMenuItem.Name = "loadFNXMLFileToolStripMenuItem"; - this.loadFNXMLFileToolStripMenuItem.Size = new System.Drawing.Size(216, 22); + this.loadFNXMLFileToolStripMenuItem.Size = new System.Drawing.Size(167, 22); this.loadFNXMLFileToolStripMenuItem.Text = "&Load Project..."; this.loadFNXMLFileToolStripMenuItem.Click += new System.EventHandler(this.LoadFNXMLFileToolStripMenuItem_Click); // // saveProjectToolStripMenuItem // this.saveProjectToolStripMenuItem.Name = "saveProjectToolStripMenuItem"; - this.saveProjectToolStripMenuItem.Size = new System.Drawing.Size(216, 22); + this.saveProjectToolStripMenuItem.Size = new System.Drawing.Size(167, 22); this.saveProjectToolStripMenuItem.Text = "&Save Project..."; this.saveProjectToolStripMenuItem.Click += new System.EventHandler(this.SaveProjectToolStripMenuItem_Click); // // loadWatchListToolStripMenuItem // this.loadWatchListToolStripMenuItem.Name = "loadWatchListToolStripMenuItem"; - this.loadWatchListToolStripMenuItem.Size = new System.Drawing.Size(216, 22); + this.loadWatchListToolStripMenuItem.Size = new System.Drawing.Size(167, 22); this.loadWatchListToolStripMenuItem.Text = "Load Watch List..."; this.loadWatchListToolStripMenuItem.Click += new System.EventHandler(this.LoadWatchListToolStripMenuItem_Click); // // saveWatchListToolStripMenuItem // this.saveWatchListToolStripMenuItem.Name = "saveWatchListToolStripMenuItem"; - this.saveWatchListToolStripMenuItem.Size = new System.Drawing.Size(216, 22); + this.saveWatchListToolStripMenuItem.Size = new System.Drawing.Size(167, 22); this.saveWatchListToolStripMenuItem.Text = "Save Watch List..."; this.saveWatchListToolStripMenuItem.Click += new System.EventHandler(this.SaveWatchListToolStripMenuItem_Click); // // exitToolStripMenuItem // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(216, 22); + this.exitToolStripMenuItem.Size = new System.Drawing.Size(167, 22); this.exitToolStripMenuItem.Text = "E&xit"; this.exitToolStripMenuItem.Click += new System.EventHandler(this.ExitToolStripMenuItem_Click); // @@ -424,46 +411,6 @@ private void InitializeComponent() this.aboutToolStripMenuItem.Text = "&About"; this.aboutToolStripMenuItem.Click += new System.EventHandler(this.AboutToolStripMenuItem_Click); // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.LightBlue; - this.panel1.Dock = System.Windows.Forms.DockStyle.Left; - this.panel1.Location = new System.Drawing.Point(0, 40); - this.panel1.Margin = new System.Windows.Forms.Padding(4); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(16, 503); - this.panel1.TabIndex = 3; - // - // panel2 - // - this.panel2.BackColor = System.Drawing.Color.LightBlue; - this.panel2.Dock = System.Windows.Forms.DockStyle.Right; - this.panel2.Location = new System.Drawing.Point(654, 40); - this.panel2.Margin = new System.Windows.Forms.Padding(4); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(16, 503); - this.panel2.TabIndex = 4; - // - // panel3 - // - this.panel3.BackColor = System.Drawing.Color.LightBlue; - this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel3.Location = new System.Drawing.Point(16, 527); - this.panel3.Margin = new System.Windows.Forms.Padding(4); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(638, 16); - this.panel3.TabIndex = 5; - // - // panel4 - // - this.panel4.BackColor = System.Drawing.Color.LightBlue; - this.panel4.Dock = System.Windows.Forms.DockStyle.Top; - this.panel4.Location = new System.Drawing.Point(0, 24); - this.panel4.Margin = new System.Windows.Forms.Padding(4); - this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(670, 16); - this.panel4.TabIndex = 6; - // // gpu // this.gpu.BackColor = System.Drawing.Color.Blue; @@ -472,11 +419,11 @@ private void InitializeComponent() this.gpu.Dock = System.Windows.Forms.DockStyle.Fill; this.gpu.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.gpu.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this.gpu.Location = new System.Drawing.Point(16, 40); + this.gpu.Location = new System.Drawing.Point(0, 24); this.gpu.Margin = new System.Windows.Forms.Padding(4); this.gpu.MinimumSize = new System.Drawing.Size(640, 480); this.gpu.Name = "gpu"; - this.gpu.Size = new System.Drawing.Size(640, 487); + this.gpu.Size = new System.Drawing.Size(670, 519); this.gpu.TabIndex = 0; this.gpu.TabStop = false; this.gpu.TileEditorMode = false; @@ -493,10 +440,6 @@ private void InitializeComponent() this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(670, 571); this.Controls.Add(this.gpu); - this.Controls.Add(this.panel3); - this.Controls.Add(this.panel2); - this.Controls.Add(this.panel1); - this.Controls.Add(this.panel4); this.Controls.Add(this.menuStrip1); this.Controls.Add(this.statusStrip1); this.DoubleBuffered = true; @@ -537,16 +480,11 @@ private void InitializeComponent() private global::System.Windows.Forms.ToolStripMenuItem cPUToolStripMenuItem; private global::System.Windows.Forms.ToolStripMenuItem memoryToolStripMenuItem; private global::System.Windows.Forms.ToolStripStatusLabel cpsPerf; - private global::System.Windows.Forms.Panel panel1; - private global::System.Windows.Forms.Panel panel2; - private global::System.Windows.Forms.Panel panel3; - private global::System.Windows.Forms.Panel panel4; private global::System.Windows.Forms.ToolStripMenuItem resetToolStripMenuItem; private global::System.Windows.Forms.ToolStripMenuItem RestartMenuItem; private global::System.Windows.Forms.ToolStripMenuItem DebugMenuItem; private System.Windows.Forms.ToolStripMenuItem menuOpenHexFile; private System.Windows.Forms.ToolStripStatusLabel fpsPerf; - private System.Windows.Forms.ToolStripMenuItem openHexFileWoZeroingToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem uploaderToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem loadImageToolStripMenuItem; diff --git a/Main/UI/MainWindow.cs b/Main/UI/MainWindow.cs index 297845b..750a86c 100644 --- a/Main/UI/MainWindow.cs +++ b/Main/UI/MainWindow.cs @@ -18,6 +18,7 @@ using System.Net.Http.Headers; using System.Text.RegularExpressions; using System.Net; +using FoenixIDE.Display; namespace FoenixIDE.UI { @@ -94,13 +95,20 @@ public MainWindow(Dictionary context) private void BasicWindow_Load(object sender, EventArgs e) { - kernel = new FoenixSystem(this.gpu, version, defaultKernel); + kernel = new FoenixSystem(version, defaultKernel); terminal = new SerialTerminal(); ShowDebugWindow(); ShowMemoryWindow(); + + // Now that the kernel is initialized, allocate variables to the GPU gpu.StartOfFrame += SOF; gpu.StartOfLine += SOL; gpu.GpuUpdated += Gpu_Update_Cps_Fps; + gpu.VRAM = kernel.MemMgr.VIDEO; + gpu.RAM = kernel.MemMgr.RAM; + gpu.VICKY = kernel.MemMgr.VICKY; + // This fontset is loaded just in case the kernel doesn't provide one. + gpu.LoadFontSet("Foenix", @"Resources\Bm437_PhoenixEGA_8x8.bin", 0, CharacterSet.CharTypeCodes.ASCII_PET, CharacterSet.SizeCodes.Size8x8); joystickWindow.beatrix = kernel.MemMgr.BEATRIX; @@ -139,12 +147,13 @@ private void BasicWindow_Load(object sender, EventArgs e) } } - private void LoadHexFile(string Filename, bool ResetMemory) + private void LoadHexFile(string Filename) { debugWindow.Pause(); kernel.SetVersion(version); - if (kernel.ResetCPU(ResetMemory, Filename)) + if (kernel.ResetCPU(Filename)) { + gpu.Refresh(); if (kernel.lstFile != null) { ShowDebugWindow(); @@ -312,10 +321,6 @@ private void FullScreenToggle() this.menuStrip1.Visible = false; this.statusStrip1.Visible = false; - this.panel1.Visible = false; - this.panel2.Visible = false; - this.panel3.Visible = false; - this.panel4.Visible = false; this.debugWindow.Visible = false; // not sure that is needed this.memoryWindow.Visible = false; // maybe maximizing GPU Window is enough? @@ -332,10 +337,6 @@ private void FullScreenToggle() this.menuStrip1.Visible = true; this.statusStrip1.Visible = true; - this.panel1.Visible = true; - this.panel2.Visible = true; - this.panel3.Visible = true; - this.panel4.Visible = true; this.debugWindow.Visible = true; this.debugWindow.Show(); this.debugWindow.Refresh(); @@ -420,11 +421,13 @@ private void Write_CPS_FPS_Safe(string CPS, string FPS) { var d = new WriteCPSFPSFunction(Write_CPS_FPS_Safe); statusStrip1.Invoke(d, new object[] { CPS, FPS}); + } else { cpsPerf.Text = CPS; fpsPerf.Text = FPS; + statusStrip1.Update(); } } int previousCounter = 0; @@ -494,8 +497,9 @@ public void RestartMenuItemClick(object sender, EventArgs e) { previousCounter = 0; debugWindow.Pause(); - if (kernel.ResetCPU(false, null)) + if (kernel.ResetCPU(null)) { + gpu.Refresh(); debugWindow.SetKernel(kernel); debugWindow.ClearTrace(); SetDipSwitchMemory(); @@ -514,7 +518,7 @@ private void DebugToolStripMenuItem_Click(object sender, EventArgs e) { previousCounter = 0; debugWindow.Pause(); - if (kernel.ResetCPU(false, null)) + if (kernel.ResetCPU(null)) { debugWindow.SetKernel(kernel); debugWindow.ClearTrace(); @@ -551,7 +555,7 @@ private void MenuOpenHexFile_Click(object sender, EventArgs e) }; if (dialog.ShowDialog() == DialogResult.OK) { - LoadHexFile(dialog.FileName, sender.Equals(menuOpenHexFile)); + LoadHexFile(dialog.FileName); } } @@ -570,8 +574,10 @@ private void LoadFNXMLFileToolStripMenuItem_Click(object sender, EventArgs e) { // TODO - this code is so coupled - we need to set the version in the XML file too. kernel.Resources = ResChecker; - if (kernel.ResetCPU(true, dialog.FileName)) + if (kernel.ResetCPU(dialog.FileName)) { + gpu.Refresh(); + debugWindow.Pause(); SetDipSwitchMemory(); ShowDebugWindow(); ShowMemoryWindow(); @@ -1018,7 +1024,7 @@ private void MainWindow_DragDrop(object sender, DragEventArgs e) FileInfo info = new FileInfo(obj[0]); if (info.Extension.ToUpper().Equals(".HEX")) { - LoadHexFile(obj[0], false); + LoadHexFile(obj[0]); } } } @@ -1100,7 +1106,7 @@ private int VersionValue(string value) try { int partialValue = int.Parse(part); - intValue += partialValue * 100; + intValue = (intValue + partialValue) * 100; } finally { diff --git a/Release Notes.txt b/Release Notes.txt index 23b8c94..e32f672 100644 --- a/Release Notes.txt +++ b/Release Notes.txt @@ -1,3 +1,10 @@ +Release 0.5.4.1 +--------------- +Fixed a bug in the SBC when using a 16-bit accumulator. +Removed the "Open Hex File (w/o Zeroing)" - the option was confusing. +Removed the silly blue border around the GPU control. +Fixed loading of breakpoints with the Foenix XML file. + Release 0.5.4.0 --------------- Handling Timer interrupts. Only the CHARGE registers are used to determine the interval. Minimum interval allowed is 1 millisecond. diff --git a/bin/Release/FoenixIDE.exe b/bin/Release/FoenixIDE.exe index dd648dbc6b771c41fc9071786636f8877b9812ab..689a21d1af7a27dd54519bc407522dc32bcdb3fe 100644 GIT binary patch delta 162025 zcmcG%37i~N)iz#T-BUf&Gn1re>7FH-?j%f7%#x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F}d9$}vTwYST<+|+~w(Qtma?8z;mK9>DFEZyUF>`+S>b>H+$i_195iJsT zm$=X6mIK0NLT;qF3Lmc#{%p6{7Ixkx#zr2k7N3E&o2DwAM z=l=879C@N(@c53ikw`L942`~D^~`8hLbRA0E#_0 zCHM}aOIY9#B^Ge_c9;08(_~rng$_%SM{xS8(h%ZbbX6aTj)@KtY&_GVM~#R2hL*A`!O zN%+)&n3TBuNoBX z><8R}=rH2rqrG?}T0G7IsMLJB_eZCnj27Q+(=*Yj=Ox;=YiYt?{ZjbRL2-Zl%h6e{ z(yWAU*LgJB;UP@6VRS@J;WDvEc(J#cQtn zGurs8|H`6GKZzEf%Cu@!M<@9q2%nxrG5))7ahs1QpqHyPsxGF78rlZDR zLuI_-uX>yb4u8!G{G-F7Ce2Ng7e_~PcS-b{uL>_dCGJ>wWpwIlw~QgZlHvMf7}z@) z8p$CUUWe0}FeiF=A3G%`JJyH4IE4?qxIVJ~J<;oMYzjYmT1<14ga=QH7ib%OHQRVk zaA1VZVSFmdt>HU|#S3Mc;j7sdd1+W&>2TZ;`Sg9UUUi9Xe}1HDOtc)4hwvV=BSFD# z@aOwNBXlgF;9U!i;FNGWjmUXsB j7ko#g8&HO~y&^5g%m>M diff --git a/bin/Release/roms/kernel.hex b/bin/Release/roms/kernel.hex index d3f2887..b1d22cb 100644 --- a/bin/Release/roms/kernel.hex +++ b/bin/Release/roms/kernel.hex @@ -16,10 +16,10 @@ :201080005CF40A395C1B0A395CE116395CE216395C7709395CAA09395CD009395CF609398B :2010A0005C6609395C670A395C420B395C0D0C395CF90F395CF810395C6312395CD80F39D6 :2010C0005CA00F395C3C0C395C5C0C395C1E0D395C2B0E395C620E395C630E395C3213397F -:2010E0005CAE13395C1C14395CD113395C5F37395C3054395CC354395CFD54395C96553906 -:201100005C3155395C4056395C0256395C3C56395CD956395C0057395C0457395CF45839F4 -:1C1120005C2941395C8D59395C5445395C780D395CB65A395C185A395C6C5A39EA -:201700005C0E6A395CE516395CE516395CE516395CE51639E220AF400100C900F07DAF4065 +:2010E0005CAE13395C1C14395CD113395C5F37395C3554395CC854395C0255395C9B5539F1 +:201100005C3655395C4556395C0756395C4156395CDE56395C0557395C0957395CF95839CC +:1C1120005C2941395C9259395C5445395C780D395CBB5A395C1D5A395C715A39D6 +:201700005C136A395CE516395CE516395CE516395CE51639E220AF400100C900F07DAF4060 :2017200001002901C901D0098F400100200918E220AF4001002902C902D0078F400100201B :201740001A18AF4001002904C904D0078F400100202B18AF4001002908C908D0078F4001CA :2017600000203C18AF4001002910C910D0098F400100204D18E220AF4001002940C940D091 @@ -57,31 +57,31 @@ :20046000C0851FE220A9AF850E8519A9AF8521E220A9008D870FA99F8F00F1AFA9BF8F0053 :20048000F1AFA9DF8F00F1AFA9FF8F00F1AFC230A24800860FA034008413A280008611A0F9 :2004A00040008415A9ED00851E22DC100022B0100022C4100022C8100022AC100022B90F82 -:2004C0003922BC100022CC100022A00F3922420B39A9010022CD5B3922395C39A90200225B -:2004E000CD5B3922395C39A9000022381000223C1000C220A20000A00000221B0A39C23094 -:200500004808E220A93948AB2868A20E6E227E0739228D0B394808C220A900005B2868224B +:2004C0003922BC100022CC100022A00F3922420B39A9010022D25B39223E5C39A902002251 +:2004E000D25B39223E5C39A9000022381000223C1000C220A20000A00000221B0A39C2308A +:200500004808E220A93948AB2868A2136E227E0739228D0B394808C220A900005B28682246 :20052000B41000E220C210A99F8F00F1AFA9BF8F00F1AFA9DF8F00F1AFA9FF8F00F1AFA9DE :20054000838F00F1AFA9128F00F1AFA9908F00F1AFA2004022191639A99F8F00F1AF58E27A :2005600020C2104808E220A93948AB2868A20000BF0010009F001000E8E00010D0F2228274 :200580004439222C0639C920F010C90DF01EC981F054C982F01DC983F032AF0EE8AF2903B0 :2005A000C900F028C901F00BC902F03A5C00003AEA80FDE220A9028F2103002254453990BF -:2005C00006220F473980E5A2EC718039E220A9068F210300225445399007220F473982CB5A -:2005E000FFA20872801FA25172227E0739E220A9008F21030022A767399007220F4739826B -:20060000AAFFA22B72227E0739A2C771227E073922210739C952D0038263FFC972D0038273 +:2005C00006220F473980E5A2F1718039E220A9068F210300225445399007220F473982CB55 +:2005E000FFA20D72801FA25672227E0739E220A9008F21030022AC67399007220F4739825C +:20060000AAFFA23072227E0739A2CC71227E073922210739C952D0038263FFC972D0038269 :200620005CFFC962F086C942F08280E48B08E220C210A93948ABA26F06221C1000C210A0CA :20064000E803E220A2E8032219163988F01C22481000C900F0EEC981F012C982F00EC98300 :20066000F00AC90DF006C920D0DAA90028AB6B46313D4644432C2046323D5344432C20464C :20068000333D4944452C2052455455524E3D42415349432C2053504143453D4445464155F3 :2006A0004C540D004808C220A900005B2868688F480200688F460200688F440200688F4CC7 :2006C0000200E220688F4E0200688F4F0200C220688F400200E220688F420200C2203B8F83 -:2006E0004A0200A9FFFE1B5C04003A4808E220A93948AB2868E220A26872227E0739221804 +:2006E0004A0200A9FFFE1B5C04003A4808E220A93948AB2868E220A26D72227E07392218FF :20070000073980FADBDB08E2208F040700286B08E2208F030700286B22210739229E073979 -:200720006B08E220AF040700F017C901F009C902F005A90028386B22CD5B3922815C398051 +:200720006B08E220AF040700F017C901F009C902F005A90028386B22D25B3922865C398047 :2007400004227E1A3828186BDA5A8B0B084808E220A90048AB2868E220AD0407C900F00332 :20076000821000C220AD8B0FCD8D0FB006224C10008005C220A90000282BAB7AFA6B22878B :200780000739221709396B4808E220C210BD0000F008229E0739E84C8D07E828686BDA5A7B :2007A0000B8B084808C220A900005B28684808E220A90048AB2868E220C21048AF03070082 -:2007C000F016C901F007C902F00368805722CD5B396822A25C39804C68C90AF069C9209038 +:2007C000F016C901F007C902F00368805722D25B396822A75C39804C68C90AF069C920902E :2007E00019C97FF045B0028031C9A09002802BC991F053C99DF0614C2408C909F069C90892 :20080000F034C90DF03AC911F042C91DF044C90FF01EC901F048C905F0748717A51E871F6D :200820002277093928AB2B7AFA6B22BB083980F422DF083980EE22AA093922BB083980E42E @@ -93,7 +93,7 @@ :2008E000480B084808C220A900005B2868C230A51A1AC50FB01B38A50FE51A1A1865173A9A :20090000A83AAA38A50FE51A44AFAFE220A9208717282B68FA6B6BDA5A8B0B084808E220A6 :20092000A90048AB28684808C220A900005B2868E220C210AF030700F01CC901F006C902A1 -:20094000F002801C22CD5B39A90D229E0739A90A229E0739800AA20000A41CC8221B0A39E9 +:20094000F002801C22D25B39A90D229E0739A90A229E0739800AA20000A41CC8221B0A39E4 :20096000282BAB7AFA6BDA5A08A20000A00000221B0A39287AFA6BDA5A480B08C220C21052 :200980004808C220A900005B2868A61AE8A41CE40F900DA20000C8C41390058822670A396F :2009A000221B0A39282B687AFA6BDA5A480B08C2304808C220A900005B2868A51AF00BA676 @@ -108,15 +108,15 @@ :200AC00000C08500A00000A51E9700C8C40FD0F9282BAB7AFA686B0848E220BD00004A4A8B :200AE0004A4A22310B39BD000022310B39CA88D0E868286B48088F44020008E220C2106809 :200B00002920C920F014AF4602004A4A4A4A22310B39AF46020022310B39AF4402004A4AD2 -:200B20004A4A22310B39AF44020022310B3928686BDAC220290F00AABF7C7239229E07397F +:200B20004A4A22310B39AF44020022310B3928686BDAC220290F00AABF817239229E07397A :200B4000FA6B48DA08E220C210A20000A9209F00A0AFE8E00020D0F6A20000AF1E00009F1D :200B600000C0AFE8E00020D0F628FA686B080B4808C220A900005B2868E220C210A0000016 :200B8000B7009704C8C02A00D0F62B286048DA5A088B0B4808C220A900005B2868C230A95D -:200BA00000C08504A9AF008506A9536F8500A939008502206D0B18A50465118504A97D6FC3 -:200BC0008500A939008502206D0B18A50465118504A9A76F8500A939008502206D0B18A5CD -:200BE0000465118504A9D16F8500A939008502206D0B18A50465118504A9FB6F8500A93949 -:200C0000008502206D0B2BAB287AFA686B0B0848DAE220E210A200BF2570399F401FAFE883 -:200C2000E040D0F3A200BF6570399F801FAFE8E040D0F3C220C210FA68282B6BE220C21002 +:200BA00000C08504A9AF008506A9586F8500A939008502206D0B18A50465118504A9826FB9 +:200BC0008500A939008502206D0B18A50465118504A9AC6F8500A939008502206D0B18A5C8 +:200BE0000465118504A9D66F8500A939008502206D0B18A50465118504A900708500A9393E +:200C0000008502206D0B2BAB287AFA686B0B0848DAE220E210A200BF2A70399F401FAFE87E +:200C2000E040D0F3A200BF6A70399F801FAFE8E040D0F3C220C210FA68282B6BE220C210FD :200C4000A20000BF0077399F0040AF9F0041AF9F0042AFE8E00001D0EAC2306B48DAA20032 :200C600000E220A900850A8602A60ABF0076394955A6029F0020AF9F0024AF9F0028AF9F59 :200C8000002CAF9F0030AF9F0034AF9F0038AF9F003CAFE88602A60ABF007839A6029F0092 @@ -159,8 +159,8 @@ :2011200011AF6010AFC900F003827500A9608F6410AF20B111A9698F6010AF20B111A9FF36 :201140008F6010AFA2FFFFCAEAEAEAEAEAEAEAEAE00000D0F220BC11AF6010AF20B111A93F :20116000F48F6010AF20BC11AF6010AFC9FAD0EC20C711AF40010029808F400100AF410141 -:201180000029018F410100AF4D010029FE8F4D0100AF4C0100297F8F4C0100A2217138B0B7 -:2011A00003A23371227E0739C220C210FA68282B6BAF6410AF2902C902F0F660AF6410AF52 +:201180000029018F410100AF4D010029FE8F4D0100AF4C0100297F8F4C0100A2267138B0B2 +:2011A00003A23871227E0739C220C210FA68282B6BAF6410AF2902C902F0F660AF6410AF4D :2011C0002901C901D0F66020B111A9A88F6410AF20B111A9A98F6410AF20BC11AF6010AF6F :2011E000C900D0EC20B111A9208F6410AF20BC11AF6010AF09024820B111A9608F6410AF62 :2012000020B111688F6010AFA9F6202D12204012A9E8202D12204012A900202D122040128A @@ -188,7 +188,7 @@ :2014C000F08F240100A5F28F260100AF2801008548AF2A0100854AA5448F200100A5468FBA :2014E000220100A5508F240100A5528F260100AF2801008544AF2A01008546A5448F200194 :2015000000A5468F22010018A54049FFFF6901008F240100A9FFFF8F260100AF2801008512 -:2015200044AF2A01008546209715A26F718003A25B71227E07396B38A07A00A20000E22042 +:2015200044AF2A01008546209715A274718003A26071227E07396B38A07A00A20000E22038 :20154000B7449F0020AFC8B7449F0120AFC8B7449F0220AFC8A9809F0320AFC8E8E8E8E8F3 :20156000E44CD0DCC2206038A03600A20000E220B7449F0024AFC8B7449F0124AFC8B74435 :201580009F0224AFC8A9809F0324AFC8E8E8E8E8E44CD0DCC22060A20000A00000E220B7F0 @@ -540,34 +540,34 @@ :2040C00006BFFE16398004BF071739852AA900852BC23018A900E6652A6528852CA9AF006E :2040E000852E6008C2308BA306AAE220A30848AB22870739C220A3048308A3028306AB68F7 :2041000068286B8B0B084808E220A90048AB28684808C220A920035B286878E220850DA5EE -:204120000C297F850C282BAB6B0B084808C220A920035B2868E220A501C900D00622D16833 +:204120000C297F850C282BAB6B0B084808C220A920035B2868E220A501C900D00622D6682E :2041400039900CE2206400282B386BE2208500282B186B5A0B8B084808E220A90048AB28C3 :20416000684808C220A920035B2868E220A00000A95A9706C8C00002D0F8A501C902F014E5 -:20418000C900F018C906F01CA980E220850028AB2B7A386B22F35D39B01280EE22D6663936 -:2041A000B00A80E622E46C39B00280DEE220640028AB2B7A386B0B8B084808E220A90048C2 +:20418000C900F018C906F01CA980E220850028AB2B7A386B22F85D39B01280EE22DB66392C +:2041A000B00A80E622E96C39B00280DEE220640028AB2B7A386B0B8B084808E220A90048BD :2041C000AB28684808C220A920035B2868E220A501C902F013C900F017C906F01BA980E290 -:2041E00020850028AB2B186B22935E3990F18010223B673990E9800822756D3990E1800010 +:2041E00020850028AB2B186B22985E3990F180102240673990E98008227A6D3990E1800001 :20420000E220640028AB2B386BDA5A0B8B084808E220A93848AB28684808C220A920035BB6 :204220002868AD20A08D32A0AD22A08D34A0A900A1851C8518A93800851E851AE220AD01F7 :20424000A0C900D024E220A9008D45A0C220A5188506A51A8508AD32A08502AD34A085045E -:2042600022441000B01F821017E220A9018D45A0C220AD32A08510AD34A0851222EC473996 -:20428000B00382F41682F8160B084808C220A920035B2868C220A900A18518A93800851A0A +:2042600022441000B01F821517E220A9018D45A0C220AD32A08510AD34A0851222EC473991 +:20428000B00382F91682FD160B084808C220A920035B2868C220A900A18518A93800851A00 :2042A000282B6BDA5A0B8B084808E220A93848AB28684808C220A920035B2868C22018A530 :2042C000186920008518A51A690000851A38A900A3E5188528A93800E51A852A300CF003ED -:2042E000829D16A528F003829616E220AD45A0C901F038C220AD32A01A8D32A0C90A00D098 -:2043000007E220A900826D16C220AD32A08502AD34A08504A900A185068518A93800850814 -:20432000851A22441000B039824E16C220AD32A08510AD34A08512A900A1851C8518A93822 -:2043400000851E851A22F74B39B003822B16A5108D32A0A5128D34A022EC4739B003821801 -:2043600016821C16DA5A0B8B084808E220A93848AB28684808C220A920035B286822025688 -:2043800039B006A90800822800A00000E220B718F01CC9E5F018223C5639B0ED22B44339C4 -:2043A000900FC220A900A18518A93800851A82CF1582C115DA8B0B084808E220A93848ABB9 +:2042E00082A216A528F003829B16E220AD45A0C901F038C220AD32A01A8D32A0C90A00D08E +:2043000007E220A900827216C220AD32A08502AD34A08504A900A185068518A9380085080F +:20432000851A22441000B039825316C220AD32A08510AD34A08512A900A1851C8518A9381D +:2043400000851E851A22FC4B39B003823016A5108D32A0A5128D34A022EC4739B003821DF2 +:2043600016822116DA5A0B8B084808E220A93848AB28684808C220A920035B28682207567E +:2043800039B006A90800822800A00000E220B718F01CC9E5F01822415639B0ED22B44339BF +:2043A000900FC220A900A18518A93800851A82D41582C615DA8B0B084808E220A93848ABAF :2043C00028684808C220A920035B2868E220AD45A0C901F009E220A915850E823E00C22018 :2043E000A90000A200009D00A1E8E8E00002D0F6A900A1851CA93800851EAD32A08510AD8C -:2044000034A08512221850399012AD36A08D32A0AD38A08D34A0282BABFA386B282BABFA71 +:2044000034A08512221D50399012AD36A08D32A0AD38A08D34A0282BABFA386B282BABFA6C :20442000186BDA5A0B8B084808E220A93848AB28684808C220A920035B2868E220AD45A0F4 :20444000C901F01FC220AD32A08502AD34A08504A900A18506A93800850822241000B01F29 -:20446000821215C220AD32A08510AD34A08512A900A1851CA93800851E2229483990E18257 -:20448000FE148B0B084808E220A90048AB28684808C220A920035B2868E220C210A200008F +:20446000821715C220AD32A08510AD34A08512A900A1851CA93800851E2229483990E18252 +:2044800003158B0B084808E220A90048AB28684808C220A920035B2868E220C210A2000089 :2044A000A9009D2003E8E01502D0F74808E220A93848AB28684808C220A920035B2868E26C :2044C00020C210A20000A9009D00A0E8E00120D0F7C220A981488F4AA038A939008F4CA050 :2044E00038E220A9028501A9FF8F50A038A900A200009D20ADE8E00001D0F7A900A2000062 @@ -575,8 +575,8 @@ :204520000800A00E00A5289720C8C8A52A972018A5206920008520A522690000852218A58C :20454000286900028528A52A690000852ACAD0D2282BAB6B8B0B084808E220A93848AB2873 :20456000684808C220A920035B2868E220A5018F50A038C902F01FC906F026C900F00BA95F -:2045800004850EA9808500827C0122A76739B00382730182670122B15D39B010A90482651E -:2045A0000122EF6B39B005A904825A01C23064026404A900A38506A938008508224410008B +:2045800004850EA9808500827C0122AC6739B00382730182670122B65D39B010A904826514 +:2045A0000122F46B39B005A904825A01C23064026404A900A38506A9380085082244100086 :2045C000B007E220A901823D01E220ADFEA4C955D007ADFFA4C9AAF005A902822801ADC2F5 :2045E000A4C90CF005A903821C018D01A0C220ADC6A48D04A0ADC8A48D06A0ADCBA48D08AD :20460000A0ADCDA48D0AA0E220A5018D00A0A9008D02A0C220A900A38506A938008508AD24 @@ -610,330 +610,331 @@ :2049800007A0010022044939A00000A920993AA0C8C00B00D0F7A20000A00000B5E0F020AA :2049A000C92EF00A993AA0E8C8C00800D0EEE8A00800B5E0F00A993AA0E8C8C00B00D0F28E :2049C000E220640E282BAB386BE220850E282BAB186B8B0B084808E220A90048AB28684848 -:2049E00008C220A920035B2868C230223A4939B005282BAB186B22544539C2202209423994 -:204A0000B007E220A90882470022884239E220A00000B718D005A909823500C9E5F026A02B -:204A20000B00B7188908D01D290FC90FF017A20000A00000B718DF3AA038D009C8E8E00B91 -:204A400000F01680EF22A34239900582BFFFA908E220850E282BAB186BC220A01A00B7189A -:204A60008510A01400B7188512E220640E282BAB386B8B0B084808E220A90048AB2868480E -:204A800008C220A920035B2868C230A51E48A51C4822D2493968851C68851E900F22EC47F1 -:204AA000399009E220640E282BAB386B282BAB186B8B0B084808E220A90048AB2868480822 -:204AC000C220A920035B2868C230A5100A8528A5122A852A18A51065288528A512652A857D -:204AE0002A462A6628A52829FF03AA462A6628462A6628462A6628462A6628462A662846B0 -:204B00002A6628462A6628462A6628462A662818AF14A03865288524AF16A038652A852623 -:204B2000282BAB6B8B0B084808E220A90048AB28684808C220A920035B2868C230A2000073 -:204B4000A95A5A8F00A538E8E8E00004D0F522B14A39A5248502A5268504A900A58506A997 -:204B600038008508224410009017E602A900A78506A938008508224410009005282BAB38E1 -:204B80006BE220A906850E282BAB186B8B0B4808E220A90048AB28684808C220A920035B78 -:204BA0002868C230A5108524A5128526A2070046266624CAD0F918A5246F14A0388524A5F7 -:204BC000266F16A0388526A5248502A5268504A900A58506A93800850822441000B006E2AE -:204BE00020A906800EC220A5100A0A29FF01AA2BAB386B2BAB186B08E220AF01A038C900AD -:204C0000D00822184C39900D800622804C399005640E28386B28186B8B0B084808E220A99D -:204C20000048AB28684808C220A920035B2868C23022244B39B003824100A510890100D0C7 -:204C40000DC220BF00A53829FF0F8528800CC220BF00A5384A4A4A4A8528C220A52829F03E -:204C60000FC9F00FF00FA52885106412E220640E282BAB386BE220A90A850E282BAB186BA8 -:204C80008B0B084808E220A90048AB28684808C220A920035B2868C230228C4B399053E226 -:204CA00020BF00A5388528BF01A5388529BF02A538852ABF03A538852BA528C9FFD018A582 -:204CC00029C9FFD012A52AC9FFD00CA52BC90FD006E220A90A801BE220A5288510A5298509 -:204CE00011A52A8512A52B8513E220640E282BAB386BE220850E282BAB186B08C23022F797 -:204D00004B39900922EC4739900328386B28186B084808C220A920035B2868E220AF01A09C -:204D200038C900D00822A14D39900D800622794E399005640E28386B28186B8B0B084808A1 -:204D4000E220A90048AB28684808C220A920035B2868C230A900A58506A938008508A5243A -:204D60008502A526850422441000B007E220A906821C00C220E602D002E604A900A785067B -:204D8000A93800850822441000B00DE220A906E2208500282BAB186BE2206400282BAB381D -:204DA0006BDA8B0B084808E220A90048AB28684808C220A920035B2868C230A90200851077 -:204DC000A90000851222B14A39223B4D39B007E220A906829900C230A510890100D009BF0E -:204DE00000A53829FF0F8008BF00A5384A4A4A4A8528C90000F0038239008A852AA51089B8 -:204E00000100D00DBF00A53809FF0F9F00A538800BBF00A53809F0FF9F00A53822434F39FD -:204E2000B007E220A914824600E220640E282BABFA386BE610D002E61222B14A39E000002F -:204E4000F0038293FFA524CF18A038D00FA526CF1AA038D007E220A912821300223B4D394C -:204E60009006A200008270FFE220A906820000E220850E282BABFA186B8B0B084808E220D6 -:204E8000A90048AB28684808C220A920035B2868C230A900A38506A938008508AF14A0382B -:204EA0008502AF16A038850422441000B007E220A906826B00C220A902008510A90000852A -:204EC00012A20800BF00A338D006BF02A338F036E610D002E612E8E8E8E8E0000290E5E647 -:204EE00002D018E604A504CF1AA038900EA502CF18A0389006E220A9128025224410009072 -:204F00001BA2000080BEC220A9FFFF9F00A338A9FF0F9F02A33822241000B00DE220A9069C -:204F2000E220850E282BAB186BE220640E282BAB386BE220AF01A038C900D0045C8A4F39B1 -:204F40004CD84F8B0B4808E220A90048AB28684808C220A920035B2868C230A900A5850616 -:204F6000A938008508A5248502A5268504222410009014A900A78506A938008508E602D024 -:204F800002E604222410002BAB6B8B0B084808E220A93848AB28684808C220A920035B28B9 -:204FA00068C23022244B398A890100D008BD00A52900F08006BD00A5290F009D00A522439F -:204FC0004F39B00BE220A906850E282BAB186BE220640E282BAB386B8B0B08C2304808E2F2 -:204FE00020A93848AB28684808C220A920035B2868228C4B39A900009D00A59D02A522249D -:205000001000B00BE220A906850E282BAB186BE220640E282BAB386B8B0B084808E220A952 -:205020003848AB28684808C220A920035B2868C230A51248A5104822104D39B00968851070 -:20504000688512827D00A5108D36A0A5128D38A02229483990E768851068851222F74B3942 -:20506000B0FAE220AF01A038C900D03DC22022B14A39A510890100D011AD36A029FF0F8D87 -:2050800036A0BD00A52900F08010AD36A00A0A0A0A8D36A0BD00A5290F000D36A09D00A562 -:2050A00022434F39B022821A00C220AD36A09D00A5AD38A09D02A522241000B00BE220A969 -:2050C00006850E282BAB186BE220640E282BAB386B8B0B084808E220A90048AB2868480835 -:2050E000C220A920035B2868C2308528290F00852AA5284A4A4A4A8528290F008F00010027 -:20510000A90A008F020100AF04010018652A852AA5284A4A4A4A8528290F008F000100A92D -:2051200064008F020100AF04010018652A852AA5284A4A4A4A290F008F000100A9E8038F8F -:20514000020100AF04010018652A282BAB6B8B0B084808E220A93848AB28684808C220A959 -:2051600020035B2868C210E220AF0E08AF09088F0E08AFAF0F08AF8529AF0A08AF8528C272 -:2051800020A52822D15039852838E9BC07C2200A0A0A0A0A0A0A0A0A2900FEA01600972045 -:2051A000E220AF0908AFC22029FF0022D1503929FF000A0A0A0A0A29E001A0160017209710 -:2051C00020E220AF0608AFC22029FF0022D15039291F00A0160017209720E220AF0408AF63 -:2051E000291FC22029FF0022D15039C2200A0A0A0A0A0A0A0A0A0A0A2900F8A01800972001 -:20520000E220AF0208AFC22029FF0022D15039C2200A0A0A0A0A29E007A0180017209720D4 -:20522000E220AF0008AFC22029FF0022D15039C220291F00A0180017209720AF0E08AF2913 -:20524000F7008F0E08AF282BAB6B8B0B084808E220A93848AB28684808C220A920035B28C5 -:2052600068C230A00200B7208528C8C8B720852AE220A00000A20000B72895E0F004E8C85C -:2052800080F6223A493922D249399007E220A90B82D200E220A00100A501972022104D39EB -:2052A000B00382C400C220A00A00A5109720C8C8A5129720A00E00B720851CC8C8B72085ED -:2052C0001E22294839B000C22022644339B01AC220A00A00B7208510C8C8B720851222D896 -:2052E0004F39E220A908827C00E220A00000A9009718C8C02000D0F8A00000B93AA0971829 -:20530000C8C00B00D0F5C220A00A00B720A01A009718A00C00B720A014009718A01200B71A -:2053200020A01C009718A01400B720A01E009718A90000A016009720A018009720A01600AF -:20534000B720A010009718A018009718A01800B720A00E009718A016009718C220222244F5 -:2053600039B00B8004E220850E282BAB186BE220640E282BAB386BDA5A8B0B084808E22066 -:20538000A93848AB28684808C220A920035B2868C230A90000A2000095E0E8E8E00001D08D -:2053A000F7A520D004A522F027A00200B7208528C8C8B720852AA528D004A52AF012E220CF -:2053C000A20000A00000B72895E0F004E8C8D0F6282BAB7AFA6B8B0B084808E220A93848D7 -:2053E000AB28684808C220A920035B2868C230A915548F640300A939008F660300A9225496 -:205400008F680300A939008F6A030022B65A39B000282BAB6B40733A68656C6C6F2E62613E -:20542000730040733A68656C6C6F322E62617300DA5A0B8B084808E220A93848AB28684892 -:2054400008C220A920035B2868E220A00000B7208938F005A90F821C052277533922D249BF -:2054600039B003821305E220A00100A5019720C220A00E00B720851CC8C8B720851E22EC86 -:205480004739B00382F204A00A00A5109720C8C8A5129720A00600A5109720C8C8A512975D -:2054A00020A01C00B718A012009720A01E00B718A014009720E220A00000A939172097206E -:2054C00082BD04DA5A0B8B084808E220A93848AB28684808C220A920035B2868224A523921 -:2054E0009018C230A00600A900009720C8C89720E220A00000A93A828604827804DA5A0BF7 -:205500008B084808E220A93848AB28684808C220A920035B2868E220A00000B7208902F065 -:205520000922965539B003824F04226C5A39824F04DA5A0B8B084808E220A93848AB286816 -:205540004808C220A920035B2868C210E220E220A00100B720850122544539C220A0060012 -:20556000B7208510C8C8B720851222F74B399013A00E00B720851CC8C8B720851E22EC47FC -:2055800039B00382F303A00600A5109720C8C8A512972082EA03DA5A0B8B084808E220A95B -:2055A0003848AB28684808C220A920035B2868C210E220A00100B720850122544539C2209F -:2055C000A00E00B720851CC8C8B720851EA00600B7208510C8C8B7208512D01AA510D01606 -:2055E000A00A00B7208510C8C8B720851222185039B00C82830322294839B003827A038210 -:205600007E03DA5A0B8B084808E220A93848AB28684808C220A920035B2868C230227753BA -:2056200039223A493922544539B003824B03C23022094239B0038240038244035CA3423989 -:20564000DA5A0B8B084808E220A93848AB28684808C220A920035B2868C23022D24939B0C1 -:2056600003821503A01A00B7188510A01400B7188512A5108D2AA0A5128D2CA022F74B399C -:20568000902FA5108D2EA0A5128D30A0AD2AA08510AD2CA0851222D84F39B00382DA02ADCB -:2056A0002EA085108D2AA0AD30A085128D2CA080CBAD2AA08510AD2CA0851222324F39B0D0 -:2056C0000382B502E220A00000A9E5971822224439B00382A30282A702DA5A0B8B084808C7 -:2056E000E220A93848AB28684808C220A920035B2868C23022D24939B00382780282800240 -:205700005C224439DA5A0B8B084808E220A93848AB28684808C220A920035B2868C2302209 -:20572000305439B003825102C220A01200B720852CC8C8B720852EA00E00B7208530C8C824 -:20574000B7208532A536C94000B0045C2A5839A00800A20000E220BF9B5739F037D93AA0FC -:20576000D028BF9C5739D93BA0D01FBF9D5739D93CA0D016C220BF9E57398528E220BFA03F -:205780005739852AA20000DC4803C2308A18690600AA80C1E220A91182DA01504758A25712 -:2057A0003900C210E220A00000B730C950D015C8B730C947D00EC8B730C958D007C8B73064 -:2057C000C901F017A91022755939C22038A52CE90800852CA52EE90000852EC220C8B73089 -:2057E0008534853CC8C8B7308536853EC8C8E220B7308734C220E634D002E63638A52CE92A -:205800000100852CA52EE90000852EA52CD004A52EF014C8CC0EA0D0D522FB4C39B003822D -:205820005701A0000080C7825601C230A00000E220B7309734C22038A52CE90100852CA5DF -:205840002EE90000852ED004A52CF01BC8CC0EA0D0DD18A5346D0EA08534A5366900008551 -:205860003622315539B0C58216015A8B0B084808E220A93848AB28684808C220A920035BFC -:205880002868C230A00E00B7208528C8C8B720852AA00000A900009728C8C8C00002D0F71D -:2058A000282BAB7A6B5A8B0B084808E220A93848AB28684808C220A920035B2868C230A0DC -:2058C0000E00B7208528C8C8B720852AA00000E220A7309728C220E630D002E632C8C0007E -:2058E00002F00CA530C538D0E6A532C53AD0E0282BAB7A6BDA5A0B8B084808E220A938486C -:20590000AB28684808C220A920035B2868C230A0120038A538E5309720C8C8A53AE53297C1 -:2059200020A0120018B72069010097209009C8C8B7206900009720226A583922A5583922CE -:20594000C35439B003823100A530C538D006A532C53AF01D226A583922A55839A00600A942 -:2059600000009720C8C8972022965539B0DA8208005C805939E220850E2818AB2B7AFA6BD7 -:20598000E2206400640E2838AB2B7AFA6BDA5A0B8B084808E220A90048AB28684808C22098 -:2059A000A920035B2868E220C210A900A200009F00AD38E8E02000D0F6C220A900AB8F0E0C -:2059C000AD38A938008F10AD38A5408F02AD38A5428F04AD38A90000853C853EA900AD85BB -:2059E00020A938008522A9FFFF8F5403008F56030022181100B014827FFFC220A53CD00BDD -:205A0000A53ED007E220A911826AFFE220A95C853B225B03008268FFDA5A0B8B084808E2F1 -:205A200020A93848AB28684808C220A920035B2868C210A20000E220BD20AD8910F014C29A -:205A4000208A18692000AAE0000190EAE220A9168222FF09109D20ADC2208A186920AD85D0 -:205A600020A9380069000085228214FFDA5A0B8B084808E220A93848AB28684808C220A91D -:205A800020035B2868E220C210A900872082F0FEDA5A0B8B084808C220A920035B2868C2E7 -:205AA00030A00E00B730AAB734A8A9000254383828AB2B7AFA6BDA5A0B8B084808E220A9CB -:205AC0000048AB28684808C220A920035B286822185A39B00382A1FEC230A00200A54497A5 -:205AE00020C8C8A5469720C230A5208530A522853222185A39B00FA5308520A532852222C4 -:205B00006C5A398273FEC230A5208534A5228536A00200A5489734C8C8A54A9734A53085A3 -:205B200020A532852222F01000B00FA5348520A5368522226C5A3982BDFFA01200B7309757 -:205B400034C8C8B730973422905A39A5348520A536852222F41000B00FA5308520A53285CF -:205B60002222F8100082C3FFA5308520A532852222001100B019E220A50EC90AF032C22015 -:205B8000A5348520A536852222F8100082CAFF22905A39A00600A900009734C8C89734A531 -:205BA000348520A536852222FC100090D182B8FFC220A5348520A536852222F81000A530E1 -:205BC0008520A532852222F8100082B3FD08C220C90200F007C220A9F8138005C220A9F8FC -:205BE000128F000700E220A9AF8F020700286B080B4808C220A900075B2868C23048E2205C -:205C0000A00300B70009809700C22068A000009700E220A00300B700498097002B286B0807 -:205C20000B4808C220A900075B2868E220C210297FA0030097002B286B080BC2304808C201 -:205C400020A900075B2868A9010022EF5B39E220A903221F5C39A9E1A0020097002B286B35 -:205C6000080BC2304808C220A900075B2868E220A00500B7002901D0042B28186B2B283895 -:205C80006B080BC2304808C220A900075B2868E220A00500B7002901F0FAA00000B7002BD3 -:205CA000286B080BC2304808C220A900075B2868E22048A00500B7002920F0FA68A000009E -:205CC00097002B286B08E220BD0000F00722A25C39E880F4286BE220AF04E8AF29FB8F0466 -:205CE000E8AF6BE220AF04E8AF29FB09048F04E8AF6BE220AF04E8AF29FE09018F04E8AFE9 -:205D00006BE220AF04E8AF29FD09028F04E8AF6BE220AF04E8AF29FE8F04E8AF6BE220AF4D -:205D200004E8AF29FD8F04E8AF6BE220AF04E8AF2903C900F014AF04E8AF09808F04E8AFCB -:205D4000AF04E8AF2940C940D0F66B8B0B084808E220A90048AB28684808C220A920035BE1 -:205D60002868E220A9F08D1E0022A8100022A0100022B15D39B003821500A9028501225447 -:205D80004539B00382080022025639B0028000226C1000282BAB6B08E220AF04EAAF2901DC -:205DA000C901F0F6286B08E220A9018F01EAAF286B0B8B084808E220A90048AB28684808C4 -:205DC000C220A920035B2868E220A9018F02EAAFA9018F03EAAF22975D39AF05EAAFD0070C -:205DE000640028AB2B386B8D0603A98B850028AB2B186B0B8B084808E220A90048AB2868B2 -:205E00004808C220A920035B2868E220AF80E8AF09028F80E8AFA9008F07EAAFA5020A8F08 -:205E200008EAAFA5032A8F09EAAFA5042A8F0AEAAFA9028F02EAAFA9018F03EAAF22975DF9 -:205E400039AF05EAAFD036E220AF13EAAF850AAF12EAAF850BC210A00000AF10EAAF970679 -:205E6000C8C00002D0F4AF05EAAFD0116400AF80E8AF29FD8F80E8AF28AB2B386B8D060379 -:205E8000A9828500AF80E8AF29FD8F80E8AF28AB2B186B0B8B084808E220A90048AB286823 -:205EA0004808C220A920035B2868E220AF80E8AF09028F80E8AFC210A00000B7068F20EAB8 -:205EC000AFC8C00002D0F4A9008F07EAAFA5020A8F08EAAFA5032A8F09EAAFA5042A8F0A9D -:205EE000EAAFA9038F02EAAFA9018F03EAAF22975D39AF05EAAFD0116400AF80E8AF29FD91 -:205F00008F80E8AF28AB2B386B8D0603A9828500AF80E8AF29FD8F80E8AF28AB2B186B8B56 -:205F20000B084808E220A90048AB28684808C220A900035B2868E220A9F08D1E0022420B52 -:205F40003922660939C23022156239B00382200022146939900382030082140022A7673936 -:205F60009003820300820800227C5F39B0028000226C100022C56239282BAB6BE220A900E3 -:205F8000A200009F0000031AE8E00002D0F5C220A900008F260300A903008F280300A9645E -:205FA000008F220300A900008F240300223B67396B40463A53414D504C452E50475820485F -:205FC000656C6C6F2C20776F726C6421000B084808C220A900035B2868E220A91E22034175 -:205FE00039A52C3012AFF413AF8980F0F4A90022034139282B3860282B18600B084808C2E0 -:2060000020A900035B2868E220A91E22034139A52C3012AFF413AF8901D0F4A9002203418C -:2060200039282B3860282B18600B084808C220A900035B2868E220A91E22034139A52C302C -:2060400012AFF413AF8910D0F4A90022034139282B3860282B18600B084808C220A900037D -:206060005B2868E220A91E22034139A52C3014AFF413AF2940C940D0F2A9002203413928AF -:206080002B3860282B18600B084808C220A900035B2868E220A91E22034139A52C3014AF6A -:2060A000F413AF29C0C980D0F2A90022034139282B3860282B1860DA08C210A2803EEACA70 -:2060C000E00000D0F928FA6BDA8B0B084808E220A90048AB28684808C220A900035B2868CB -:2060E00022B76039E230A200A9009D1005E8E010D0F8AFF413AF29C0C980F0042215623922 -:20610000E210A20020CD5FB003825E00BD00058FF513AF22B76039E8EC3005D0E7AD3305ED -:20612000D003828000103CA50B3003823C00AFF413AF8980F0F18920D003826800C210A076 -:206140000000A50B3003822100AFF413AF8920F0548980F0EDB7268FF513AFC8C00002D004 -:20616000E18042205760A50B3007E220A98C829C00AFF413AF29C0C9C0D0EBAFF413AF89E9 -:2061800020D003828300C210A00000A50B10DBAFF413AF29C0C9C0D0F2AFF513AF9726C876 -:2061A000C00002D0E6AD3205F034E210A200A91E2203413920576090B1AFF513AF20576010 -:2061C00090A8AFF513AF9D100520CD5F909CAFF413AF2950C950D006E8EC3205D0E4C21099 -:2061E000A20A0022191639AFF413AF8910F012205760B0038273FFAFF513AF9D1005E8806B -:20620000DD6420282BABFA386BE220A9858520282BABFA186B08C210E220A9008FF213AF6A -:20622000A2E803A0000022261639A9048FF213AFEAEAEAEAA9008FF413AFA9008FF713AF23 -:20624000A28FC5A020002226163922256339902522256339901F2225633990192225633958 -:20626000901322E76339900D228E633990072291623928386B28186B08C22078A984038F71 -:206280004EA038E220AF4C010029FE8F4C0100286B0822786239E220AFF213AF8910D01F1A -:2062A000A9148FF213AF20CD5F9017A21E8BA0410022261639AF0B030009808F0B0300281D -:2062C000386B28186B08E220A9048FF213AFC22078A900008F4EA038E220AF4C01000901B6 -:2062E0008F4C0100AF0B0300297F8F0B0300286B0B084808C220A900035B2868227862391C -:20630000E220A9078D0005A5008D0105A9028D30059C33059C320522C860399004282B384B -:206320006B282B186B8B0B084808E220A90048AB28684808C220A900035B2868C230A20A99 -:206340000022191639E2206406A9FF850A202960903020CD5F902BA9088FF513AF205760D2 -:20636000902020CD5F901BAFF513AF850620CD5F9010AFF513AF850AE2209C2003282BABE5 -:20638000386BE220A98C8D2003282BAB186B8B0B084808E220A90048AB28684808C220A9FB -:2063A00000035B2868C230A20A0022191639E220202960902620CD5F9021A9038FF513AF77 -:2063C00020CD5F9016A9CF8FF513AF20CD5F900BA9018FF513AF282BAB386BE220A98C8DD1 -:2063E0002003282BAB186B8B0B084808E220A90048AB28684808C220A900035B2868C23022 -:20640000A20A0022191639E220202960903620CD5F9031A9138FF513AF20CD5F9026A9001B -:206420008FF513AF20CD5F901BA9448FF513AF20CD5F9010A9008FF513AF202960900528AB -:206440002BAB386BE220A98C8D2003282BAB186B8B0B084808E220A90048AB28684808C22D -:2064600020A900035B2868E220A90A8D0005A9018D30059C3305A9078D320522C860399057 -:2064800027AD10058506AD11058507AD12058508AD13058502AD14058501AD1505850AAD4D -:2064A00016058504282BAB6B282BAB186B0B08E220A90E8D0005A9018D30059C3305A90AFD -:2064C0008D320522C860399003282B6B282B186B8B0B084808E220A90048AB28684808C220 -:2064E00020A900035B286822786239E220A90F8D0005A50129010A0A05008D0105A5028DB4 -:206500000205A9038D30059C33059C320522C860399005282BAB386B282BAB186B8B0B0887 -:206520004808E220A90048AB28684808C220A900035B286822786239E220A90609408D0058 -:2065400005A50129010A0A05008D0105A5028D0205A5018D0305A5038D0405A9028D0505C4 -:20656000A9128D0605A91B8D0705A9FF8D0805A9098D3005A9018D3305A9078D320522C8E8 -:20658000603908AD10058506AD11058507AD12058508AD13058502AD14058501AD15058589 -:2065A0000AAD16058504289004282BAB6B282BAB186B8B0B084808E220A90048AB28684876 -:2065C00008C220A900035B2868E22022786239A90509408D0005A50129010A0A05008D0103 -:2065E00005A5028D0205A5018D0305A5038D0405A9028D0505A9128D0605A91B8D0705A947 -:20660000FF8D0805A9098D3005A9FF8D3305A9078D320522C8603908AD10058506AD1105F1 -:206620008507AD12058508AD13058502AD14058501AD1505850AAD16058504289004282B2F -:20664000AB6B282BAB186BDA5A0B084808C220A90C035B2868C2306408640AA220000600F3 -:2066600026022608260AA50838E504A8A50AE5069006850A8408E600CAD0E3282B7AFA6049 -:206680008B0B084808E220A90048AB28684808C220A900035B2868C230A522850CA524857D -:2066A0000EA9240085106412204766E220A50C8502C220A514850CA516850EA91200851023 -:2066C0006412204766E220A50C29018501A5141A8503282BAB6B8B0B084808E220A900486F -:2066E000AB28684808C220A900035B2868E220A9038D3405C23022806639E220A503F0292C -:20670000C220221D65399014E220A50629D0D019E220A9008D2003282BAB386BE220CE3487 -:206720000530132215623980D7E220A9828004E220A9848D2003282BAB186B8B0B084808E9 -:20674000E220A90048AB28684808C220A900035B2868E220A9038D3405C230228066392279 -:20676000B26539B003822800E220A50629D0D00CE220A9008D2003282BAB386BE220A50740 -:206780008902F004A98680178910D0E48980D0E0E220CE3405D0C8A9838004E220A9848DA1 -:2067A0002003282BAB186B8B0B084808E220A90048AB28684808C220A900035B2868221519 -:2067C0006239E220C210A900A200009F00A338E8E00002D0F6A900850022916239C230A9DE -:2067E000000085228524A900A38526A93800852822D66639B00382D300E220A9008F01A04A -:2068000038A9008F02A038E220AF0DA3388F03A038C220A900008F04A0388F06A038AF1603 -:20682000A3388F10A038A900008F12A038A901008F14A038186F10A0388F18A038A9000028 -:206840008F16A0388F1AA03818AF18A0386F10A0388F20A038A900008F22A038AF11A338D8 -:206860008F24A0384A4A4A4A186F20A0388F1CA038A900008F1EA038AF13A3388F08A03829 -:20688000A900008F0AA038AF0EA3388F0CA038A900028F0EA038E220AF26A338C92980147B -:2068A000C220AF27A3388F26A038AF29A3388F28A038800DC220A900008F26A0388F28A07A -:2068C00038E220A9008520282BAB386B282BAB186B8B0B084808E220A90048AB28684808A2 -:2068E000C220A900035B2868E230E001F00FE002F011E003F0136420282BAB386B2291622A -:206900003980F322C5623980ED22F06239B0E7282BAB186B0B084808C220A900035B28683B -:2069200022916239E220AFF713AF8980F042A9008500A9008501A950850222D06439903434 -:20694000C210A21E8BA041002226163922256339A50629D0D01E22F062399018A21E8BA0ED -:2069600041002226163922256339A50629D0D004282B386B282B186B8B0B084808E220A97F -:206980000048AB28684808C220A920035B286822A76739C230A90000A200009F00A338E883 -:2069A000E8E00002D0F5E220A20000BF606A399F00A338E8E0C900D0F2A00000A24000B7DC -:2069C0003C9F00A338F007E8C8C08000D0F1C220A955AA8FFEA438C220A900A38506A938CC -:2069E000008508A9000085028504E220A900850122241000B00922C56239282BAB186B22EC -:206A0000C56239E220A9008500282BAB386B08E220AF4EA038D006AF4FA038F028AF4EA005 -:206A2000383A8F4EA038C9FFD00BAF4FA0383A8F4FA0388010AF4EA038D00AAF4FA038D0E1 -:206A40000422C56239E220AF2D0300F0113A8F2D0300D00AAF2C030009808F2C0300286B43 -:206A6000EB009043323536444F5320000201010002E000400BF00900120002000000000077 -:206A80000000000000002978563412554E5449544C45442020204641543132202020804092 -:206AE000C220A940A38F600300A938008F620300228D5939B00CE2204BAB620800FA221CCA -:206B00001000EA80FD436F756C64206E6F742066696E64206120626F6F7461626C6520626A -:206B2000696E6172792E0D0008C220A900A38F260300A938008F28030022566C39B003821C -:206B4000AB00C210E220A02800A23600BF01A33822181000BF00A33822181000E8E888886D -:206B6000D0EAC210E220A01400A21400BF01A33822181000BF00A33822181000E8E8888874 -:206B8000D0EA226C1000C230A901008F220300A900008F240300A900A38F260300A9380009 -:206BA0008F280300A20000A9A55A9F00A338E8E8E00002D0F522756D39B006226C100080CF -:206BC0002CA901008F220300A900008F240300A900A58F260300A938008F28030022E46CB9 -:206BE00039B006226C10008004226C1000286BE22020126CA9008F35E8AF8F34E8AF8F3294 -:206C0000E8AFA9018F33E8AFA9A08F36E8AF20306C6B08E220AF37E8AF2980C980F0F62887 -:206C20006008E220AF37E8AF2940C940D0F6286008E220AF37E8AF29C0C940D0F6283860AE -:206C40008F07030028186008E220AF37E8AF2908C908D0F628605A8B0B084808E220A90031 -:206C600048AB28684808C220A920035B2868E22020306CA505290709A08F36E8AF20306C4F -:206C8000E220A9008F32E8AF8F33E8AF8F34E8AF8F35E8AFA9EC8F37E8AFF02920126C201A -:206CA000306C902DC230A00000AF38E8AF9706C8C8C00002D0F3E220A90085008D060328CB -:206CC0002BAB7A386BE220A987800AE220A98A8004E220A9828500AF31E8AF8D0603282B3A -:206CE000AB7A186B5A8B0B084808E220A90048AB28684808C220A920035B2868E22020303B -:206D00006CA505290709E08F36E8AF20306CE220A9018F32E8AFA5028F33E8AFA5038F34BD -:206D2000E8AFA5048F35E8AFA9218F37E8AFEAEAEAEA20306C902BE220AF30E8AFA000005A -:206D4000C220AF38E8AF9706C8C8C00002D0F3EAEAEAEAE220A90085008D0603282BAB7A3B -:206D6000386BE220AF31E8AF8D0603A9828500282BAB7A186B5A8B0B084808E220A900487B -:206D8000AB28684808C220A920035B2868E22020306CA505290709E08F36E8AF20306CE254 -:206DA00020A9018F32E8AFA5028F33E8AFA5038F34E8AFA5048F35E8AFA9308F37E8AFEA8B -:206DC000EAEAEA20306C9033C230A00000B7068F38E8AFC8C8C00002D0F3EAEAEAEA2030BC -:206DE0006C9018AF37E8AF892100D00FE220A90085008D0603282BAB7A386BE220AF31E8CE -:206E0000AF8D0603A9828500282BAB7A186B202020200B0C0B0C0B0C0B0C0B0C204646469D -:206E200046464646204D4D4D4D4D4D4D4D20585820202020585858200D2020200B0C0B0C9F -:206E40000B0C0B0C0B0C2046462020202020204D4D204D4D204D4D2020205858205858583B -:206E60002020200D20200B0C0B0C0B0C0B0C0B0C2046464646462020204D4D204D4D204D53 -:206E80004D202020205858582020202020200D200B0C0B0C0B0C0B0C0B0C204646202020B1 -:206EA0002020204D4D204D4D204D4D20205858582020585820202020200D0B0C0B0C0B0C3A -:206EC0000B0C0B0C2046462020202020204D4D204D4D204D4D205858582020202020585892 -:206EE000202020200D0D4332353620464F454E495820464D58202D2D20332C3637302C3032 -:206F0000313620427974657320467265650D7777772E63323536666F656E69782E636F6DAB -:206F2000202D204B65726E656C2076657273696F6E3A2076302E312E302D616C7068612B42 -:206F4000313031302028323032302D30392D3330290D001D1D1D1D1D1D8D8D4D4D2D2D5DEE -:206F60005DFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD1D1D1DB1 -:206F80001D1D8D8D4D4D2D2D5D5DFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD31 -:206FA000FDFDFDFDFDFDFD1D1D1D1D8D8D4D4D2D2D5D5DFDFDFDFDFDFDFDFDFDFDFDFDFDD1 -:206FC000FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD1D1D1D8D8D4D4D2D2D5D5DFDFDFDFDD1 -:206FE000FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD1D1D8D8D4D41 -:207000004D2D2D5D5DFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD60 -:20702000FDFDFDFDFD000000FF000080FF008000FF800000FF008080FF808000FF800080E5 -:20704000FF808080FF0045FFFF13458BFF000020FF002000FF200000FF202020FF40404011 -:20706000FFFFFFFFFF000000FF000080FF008000FF800000FF002020FF202000FF200020DB -:20708000FF202020FF1E69D2FF13458BFF000020FF002000FF400000FF101010FF404040EC -:2070A000FFFFFFFFFF436D6420307841412054657374207061737365642E2E2E0D00436DD0 -:2070C0006420307841422054657374207061737365642E2E2E0D00436D64203078363020A8 -:2070E00045786563757465642E0D00436D642030784646202852657365742920446F6E659C -:207100002E0D00436D642030784545204563686F2054657374207061737365642E2E2E0D38 -:20712000004B6579626F6172642050726573656E740D004E6F204B6579626F6172642041A1 -:2071400074746163686564206F72204661696C656420496E69742E2E2E0D004E4F20534948 -:20716000474E415455524520464F554E442E00424D50204C4F414445442E004558454355DF -:2071800054494E4720424D502050415253455200494445204844442050726573656E743AD4 -:2071A00000426F6F7420444950207377697463682073657474696E67732061726520696EAC -:2071C00076616C69642E005072657373205220746F2072657472792C204220746F20676F12 -:2071E00020746F2042415349432E0D00556E61626C6520746F2072656164207468652053E5 -:207200004420636172642E00556E61626C6520746F20726561642066726F6D2074686520D7 -:207220004944452064726976652E00556E61626C6520746F20726561642066726F6D207496 -:20724000686520666C6F7070792064726976652E00426F6F74696E672066726F6D20666CA7 -:207260006F7070792E2E2E000D52454144592E0041424F5254204552524F52003031323324 -:0D7280003435363738394142434445460025 +:2049E00008C220A920035B2868C230223A4939B005282BAB186B22544539B003825600C2CF +:204A00002022094239B007E220A90882470022884239E220A00000B718D005A909823500C9 +:204A2000C9E5F026A00B00B7188908D01D290FC90FF017A20000A00000B718DF3AA038D0D1 +:204A400009C8E8E00B00F01680EF22A34239900582BFFFA908E220850E282BAB186BC2207F +:204A6000A01A00B7188510A01400B7188512E220640E282BAB386B8B0B084808E220A90050 +:204A800048AB28684808C220A920035B2868C230A51E48A51C4822D2493968851C68851E1A +:204AA000900F22EC47399009E220640E282BAB386B282BAB186B8B0B084808E220A90048B9 +:204AC000AB28684808C220A920035B2868C230A5100A8528A5122A852A18A51065288528BD +:204AE000A512652A852A462A6628A52829FF03AA462A6628462A6628462A6628462A662829 +:204B0000462A6628462A6628462A6628462A6628462A662818AF14A03865288524AF16A051 +:204B200038652A8526282BAB6B8B0B084808E220A90048AB28684808C220A920035B286895 +:204B4000C230A20000A95A5A8F00A538E8E8E00004D0F522B64A39A5248502A5268504A9D7 +:204B600000A58506A938008508224410009017E602A900A78506A938008508224410009043 +:204B800005282BAB386BE220A906850E282BAB186B8B0B4808E220A90048AB28684808C284 +:204BA00020A920035B2868C230A5108524A5128526A2070046266624CAD0F918A5246F14D6 +:204BC000A0388524A5266F16A0388526A5248502A5268504A900A58506A938008508224430 +:204BE0001000B006E220A906800EC220A5100A0A29FF01AA2BAB386B2BAB186B08E220AFA7 +:204C000001A038C900D008221D4C39900D800622854C399005640E28386B28186B8B0B08EC +:204C20004808E220A90048AB28684808C220A920035B2868C23022294B39B003824100A531 +:204C400010890100D00DC220BF00A53829FF0F8528800CC220BF00A5384A4A4A4A8528C2DA +:204C600020A52829F00FC9F00FF00FA52885106412E220640E282BAB386BE220A90A850E23 +:204C8000282BAB186B8B0B084808E220A90048AB28684808C220A920035B2868C2302291E9 +:204CA0004B399053E220BF00A5388528BF01A5388529BF02A538852ABF03A538852BA5288E +:204CC000C9FFD018A529C9FFD012A52AC9FFD00CA52BC90FD006E220A90A801BE220A5289C +:204CE0008510A5298511A52A8512A52B8513E220640E282BAB386BE220850E282BAB186BC2 +:204D000008C23022FC4B39900922EC4739900328386B28186B084808C220A920035B2868D6 +:204D2000E220AF01A038C900D00822A64D39900D8006227E4E399005640E28386B28186B33 +:204D40008B0B084808E220A90048AB28684808C220A920035B2868C230A900A58506A938A2 +:204D6000008508A5248502A526850422441000B007E220A906821C00C220E602D002E60400 +:204D8000A900A78506A93800850822441000B00DE220A906E2208500282BAB186BE2206478 +:204DA00000282BAB386BDA8B0B084808E220A90048AB28684808C220A920035B2868C23081 +:204DC000A902008510A90000851222B64A3922404D39B007E220A906829900C230A510895D +:204DE0000100D009BF00A53829FF0F8008BF00A5384A4A4A4A8528C90000F0038239008A0C +:204E0000852AA510890100D00DBF00A53809FF0F9F00A538800BBF00A53809F0FF9F00A535 +:204E20003822484F39B007E220A914824600E220640E282BABFA386BE610D002E61222B663 +:204E40004A39E00000F0038293FFA524CF18A038D00FA526CF1AA038D007E220A9128213CC +:204E60000022404D399006A200008270FFE220A906820000E220850E282BABFA186B8B0B48 +:204E8000084808E220A90048AB28684808C220A920035B2868C230A900A38506A938008574 +:204EA00008AF14A0388502AF16A038850422441000B007E220A906826B00C220A9020085C5 +:204EC00010A900008512A20800BF00A338D006BF02A338F036E610D002E612E8E8E8E8E066 +:204EE000000290E5E602D018E604A504CF1AA038900EA502CF18A0389006E220A91280251B +:204F000022441000901BA2000080BEC220A9FFFF9F00A338A9FF0F9F02A33822241000B054 +:204F20000DE220A906E220850E282BAB186BE220640E282BAB386BE220AF01A038C900D065 +:204F4000045C8F4F394CDD4F8B0B4808E220A90048AB28684808C220A920035B2868C23073 +:204F6000A900A58506A938008508A5248502A5268504222410009014A900A78506A9380090 +:204F80008508E602D002E604222410002BAB6B8B0B084808E220A93848AB28684808C220C3 +:204FA000A920035B2868C23022294B398A890100D008BD00A52900F08006BD00A5290F00F2 +:204FC0009D00A522484F39B00BE220A906850E282BAB186BE220640E282BAB386B8B0B086A +:204FE000C2304808E220A93848AB28684808C220A920035B286822914B39A900009D00A5FE +:205000009D02A522241000B00BE220A906850E282BAB186BE220640E282BAB386B8B0B08C3 +:205020004808E220A93848AB28684808C220A920035B2868C230A51248A5104822154D3926 +:20504000B009688510688512827D00A5108D36A0A5128D38A02229483990E768851068853B +:205060001222FC4B39B0FAE220AF01A038C900D03DC22022B64A39A510890100D011AD3632 +:20508000A029FF0F8D36A0BD00A52900F08010AD36A00A0A0A0A8D36A0BD00A5290F000D16 +:2050A00036A09D00A522484F39B022821A00C220AD36A09D00A5AD38A09D02A522241000B2 +:2050C000B00BE220A906850E282BAB186BE220640E282BAB386B8B0B084808E220A900485A +:2050E000AB28684808C220A920035B2868C2308528290F00852AA5284A4A4A4A8528290F2C +:20510000008F000100A90A008F020100AF04010018652A852AA5284A4A4A4A8528290F00D6 +:205120008F000100A964008F020100AF04010018652A852AA5284A4A4A4A290F008F000179 +:2051400000A9E8038F020100AF04010018652A282BAB6B8B0B084808E220A93848AB286811 +:205160004808C220A920035B2868C210E220AF0E08AF09088F0E08AFAF0F08AF8529AF0ABD +:2051800008AF8528C220A52822D65039852838E9BC07C2200A0A0A0A0A0A0A0A0A2900FE87 +:2051A000A016009720E220AF0908AFC22029FF0022D6503929FF000A0A0A0A0A29E001A082 +:2051C000160017209720E220AF0608AFC22029FF0022D65039291F00A0160017209720E204 +:2051E00020AF0408AF291FC22029FF0022D65039C2200A0A0A0A0A0A0A0A0A0A0A2900F8E1 +:20520000A018009720E220AF0208AFC22029FF0022D65039C2200A0A0A0A0A29E007A0184E +:205220000017209720E220AF0008AFC22029FF0022D65039C220291F00A0180017209720BD +:20524000AF0E08AF29F7008F0E08AF282BAB6B8B0B084808E220A93848AB28684808C22077 +:20526000A920035B2868C230A00200B7208528C8C8B720852AE220A00000A20000B7289591 +:20528000E0F004E8C880F6223A493922D249399007E220A90B82D200E220A00100A501973F +:2052A0002022154D39B00382C400C220A00A00A5109720C8C8A5129720A00E00B720851CFC +:2052C000C8C8B720851E22294839B000C22022644339B01AC220A00A00B7208510C8C8B75B +:2052E00020851222DD4F39E220A908827C00E220A00000A9009718C8C02000D0F8A00000B5 +:20530000B93AA09718C8C00B00D0F5C220A00A00B720A01A009718A00C00B720A014009759 +:2053200018A01200B720A01C009718A01400B720A01E009718A90000A016009720A018009B +:205340009720A01600B720A010009718A018009718A01800B720A00E009718A016009718F2 +:20536000C22022224439B00B8004E220850E282BAB186BE220640E282BAB386BDA5A8B0B56 +:20538000084808E220A93848AB28684808C220A920035B2868C230A90000A2000095E0E8CC +:2053A000E8E00001D0F7A520D004A522F027A00200B7208528C8C8B720852AA528D004A564 +:2053C0002AF012E220A20000A00000B72895E0F004E8C8D0F6282BAB7AFA6B8B0B084808D4 +:2053E000E220A93848AB28684808C220A920035B2868C230A91A548F640300A939008F6688 +:205400000300A927548F680300A939008F6A030022BB5A39B000282BAB6B40733A68656CDE +:205420006C6F2E6261730040733A68656C6C6F322E62617300DA5A0B8B084808E220A93891 +:2054400048AB28684808C220A920035B2868E220A00000B7208938F005A90F821C05227CB8 +:20546000533922D24939B003821305E220A00100A5019720C220A00E00B720851CC8C8B78E +:2054800020851E22EC4739B00382F204A00A00A5109720C8C8A5129720A00600A51097206A +:2054A000C8C8A5129720A01C00B718A012009720A01E00B718A014009720E220A00000A9B7 +:2054C000391720972082BD04DA5A0B8B084808E220A93848AB28684808C220A920035B2859 +:2054E00068224F52399018C230A00600A900009720C8C89720E220A00000A93A828604824E +:205500007804DA5A0B8B084808E220A93848AB28684808C220A920035B2868E220A00000FC +:20552000B7208902F009229B5539B003824F0422715A39824F04DA5A0B8B084808E220A975 +:205540003848AB28684808C220A920035B2868C210E220E220A00100B720850122544539DF +:20556000C220A00600B7208510C8C8B720851222FC4B399013A00E00B720851CC8C8B72067 +:20558000851E22EC4739B00382F303A00600A5109720C8C8A512972082EA03DA5A0B8B085E +:2055A0004808E220A93848AB28684808C220A920035B2868C210E220A00100B72085012258 +:2055C000544539C220A00E00B720851CC8C8B720851EA00600B7208510C8C8B7208512D007 +:2055E0001AA510D016A00A00B7208510C8C8B7208512221D5039B00C82830322294839B0DA +:2056000003827A03827E03DA5A0B8B084808E220A93848AB28684808C220A920035B286814 +:20562000C230227C5339223A493922544539B003824B03C23022094239B003824003824423 +:20564000035CA34239DA5A0B8B084808E220A93848AB28684808C220A920035B2868C2306A +:2056600022D24939B003821503A01A00B7188510A01400B7188512A5108D2AA0A5128D2CB3 +:20568000A022FC4B39902FA5108D2EA0A5128D30A0AD2AA08510AD2CA0851222DD4F39B092 +:2056A0000382DA02AD2EA085108D2AA0AD30A085128D2CA080CBAD2AA08510AD2CA085124E +:2056C00022374F39B00382B502E220A00000A9E5971822224439B00382A30282A702DA5A24 +:2056E0000B8B084808E220A93848AB28684808C220A920035B2868C23022D24939B00382D0 +:2057000078028280025C224439DA5A0B8B084808E220A93848AB28684808C220A920035B2F +:205720002868C23022355439B003825102C220A01200B720852CC8C8B720852EA00E00B7E0 +:20574000208530C8C8B7208532A536C94000B0045C2F5839A00800A20000E220BFA0573967 +:20576000F037D93AA0D028BFA15739D93BA0D01FBFA25739D93CA0D016C220BFA3573985DF +:2057800028E220BFA55739852AA20000DC4803C2308A18690600AA80C1E220A91182DA016C +:2057A000504758A7573900C210E220A00000B730C950D015C8B730C947D00EC8B730C958FD +:2057C000D007C8B730C901F017A910227A5939C22038A52CE90800852CA52EE90000852E8F +:2057E000C220C8B7308534853CC8C8B7308536853EC8C8E220B7308734C220E634D002E6C1 +:205800003638A52CE90100852CA52EE90000852EA52CD004A52EF014C8CC0EA0D0D52200BA +:205820004D39B003825701A0000080C7825601C230A00000E220B7309734C22038A52CE97B +:205840000100852CA52EE90000852ED004A52CF01BC8CC0EA0D0DD18A5346D0EA08534A51E +:2058600036690000853622365539B0C58216015A8B0B084808E220A93848AB28684808C21A +:2058800020A920035B2868C230A00E00B7208528C8C8B720852AA00000A900009728C8C85F +:2058A000C00002D0F7282BAB7A6B5A8B0B084808E220A93848AB28684808C220A920035B75 +:2058C0002868C230A00E00B7208528C8C8B720852AA00000E220A7309728C220E630D002FC +:2058E000E632C8C00002F00CA530C538D0E6A532C53AD0E0282BAB7A6BDA5A0B8B084808F7 +:20590000E220A93848AB28684808C220A920035B2868C230A0120038A538E5309720C8C823 +:20592000A53AE5329720A0120018B72069010097209009C8C8B7206900009720226F5839B6 +:2059400022AA583922C85439B003823100A530C538D006A532C53AF01D226F583922AA583C +:2059600039A00600A900009720C8C89720229B5539B0DA8208005C855939E220850E2818FA +:20598000AB2B7AFA6BE2206400640E2838AB2B7AFA6BDA5A0B8B084808E220A90048AB287D +:2059A000684808C220A920035B2868E220C210A900A200009F00AD38E8E02000D0F6C22063 +:2059C000A900AB8F0EAD38A938008F10AD38A5408F02AD38A5428F04AD38A90000853C85E3 +:2059E0003EA900AD8520A938008522A9FFFF8F5403008F56030022181100B014827FFFC2A0 +:205A000020A53CD00BA53ED007E220A911826AFFE220A95C853B225B03008268FFDA5A0BDA +:205A20008B084808E220A93848AB28684808C220A920035B2868C210A20000E220BD20AD34 +:205A40008910F014C2208A18692000AAE0000190EAE220A9168222FF09109D20ADC2208A44 +:205A6000186920AD8520A9380069000085228214FFDA5A0B8B084808E220A93848AB286825 +:205A80004808C220A920035B2868E220C210A900872082F0FEDA5A0B8B084808C220A920BC +:205AA000035B2868C230A00E00B730AAB734A8A9000254383828AB2B7AFA6BDA5A0B8B0816 +:205AC0004808E220A90048AB28684808C220A920035B2868221D5A39B00382A1FEC230A027 +:205AE0000200A5449720C8C8A5469720C230A5208530A5228532221D5A39B00FA5308520DD +:205B0000A532852222715A398273FEC230A5208534A5228536A00200A5489734C8C8A54A23 +:205B20009734A5308520A532852222F01000B00FA5348520A536852222715A3982BDFFA0BD +:205B40001200B7309734C8C8B730973422955A39A5348520A536852222F41000B00FA5303B +:205B60008520A532852222F8100082C3FFA5308520A532852222001100B019E220A50EC922 +:205B80000AF032C220A5348520A536852222F8100082CAFF22955A39A00600A9000097341E +:205BA000C8C89734A5348520A536852222FC100090D182B8FFC220A5348520A536852222BE +:205BC000F81000A5308520A532852222F8100082B3FD08C220C90200F007C220A9F81380A7 +:205BE00005C220A9F8128F000700E220A9AF8F020700286B080B4808C220A900075B286810 +:205C0000C23048E220A00300B70009809700C22068A000009700E220A00300B70049809791 +:205C2000002B286B080B4808C220A900075B2868E220C210297FA0030097002B286B080B3F +:205C4000C2304808C220A900075B2868A9010022F45B39E220A90322245C39A9E1A002007C +:205C600097002B286B080BC2304808C220A900075B2868E220A00500B7002901D0042B284E +:205C8000186B2B28386B080BC2304808C220A900075B2868E220A00500B7002901F0FAA0A7 +:205CA0000000B7002B286B080BC2304808C220A900075B2868E22048A00500B7002920F0BE +:205CC000FA68A0000097002B286B08E220BD0000F00722A75C39E880F4286BE220AF04E8C5 +:205CE000AF29FB8F04E8AF6BE220AF04E8AF29FB09048F04E8AF6BE220AF04E8AF29FE09AE +:205D0000018F04E8AF6BE220AF04E8AF29FD09028F04E8AF6BE220AF04E8AF29FE8F04E8ED +:205D2000AF6BE220AF04E8AF29FD8F04E8AF6BE220AF04E8AF2903C900F014AF04E8AF09AA +:205D4000808F04E8AFAF04E8AF2940C940D0F66B8B0B084808E220A90048AB28684808C27E +:205D600020A920035B2868E220A9F08D1E0022A8100022A0100022B65D39B003821500A9F9 +:205D800002850122544539B00382080022075639B0028000226C1000282BAB6B08E220AFA0 +:205DA00004EAAF2901C901F0F6286B08E220A9018F01EAAF286B0B8B084808E220A9004888 +:205DC000AB28684808C220A920035B2868E220A9018F02EAAFA9018F03EAAF229C5D39AFF1 +:205DE00005EAAFD007640028AB2B386B8D0603A98B850028AB2B186B0B8B084808E220A9C0 +:205E00000048AB28684808C220A920035B2868E220AF80E8AF09028F80E8AFA9008F07EA74 +:205E2000AFA5020A8F08EAAFA5032A8F09EAAFA5042A8F0AEAAFA9028F02EAAFA9018F03B9 +:205E4000EAAF229C5D39AF05EAAFD036E220AF13EAAF850AAF12EAAF850BC210A00000AF0B +:205E600010EAAF9706C8C00002D0F4AF05EAAFD0116400AF80E8AF29FD8F80E8AF28AB2B6C +:205E8000386B8D0603A9828500AF80E8AF29FD8F80E8AF28AB2B186B0B8B084808E220A96D +:205EA0000048AB28684808C220A920035B2868E220AF80E8AF09028F80E8AFC210A000008B +:205EC000B7068F20EAAFC8C00002D0F4A9008F07EAAFA5020A8F08EAAFA5032A8F09EAAFB3 +:205EE000A5042A8F0AEAAFA9038F02EAAFA9018F03EAAF229C5D39AF05EAAFD0116400AF5D +:205F000080E8AF29FD8F80E8AF28AB2B386B8D0603A9828500AF80E8AF29FD8F80E8AF28FD +:205F2000AB2B186B8B0B084808E220A90048AB28684808C220A900035B2868E220A9F08DFB +:205F40001E0022420B3922660939C230221A6239B003822000221969399003820300821408 +:205F60000022AC6739900382030082080022815F39B0028000226C100022CA6239282BAB81 +:205F80006BE220A900A200009F0000031AE8E00002D0F5C220A900008F260300A903008F80 +:205FA000280300A964008F220300A900008F240300224067396B40463A53414D504C452E79 +:205FC0005047582048656C6C6F2C20776F726C6421000B084808C220A900035B2868E2204B +:205FE000A91E22034139A52C3012AFF413AF8980F0F4A90022034139282B3860282B1860D8 +:206000000B084808C220A900035B2868E220A91E22034139A52C3012AFF413AF8901D0F476 +:20602000A90022034139282B3860282B18600B084808C220A900035B2868E220A91E220398 +:206040004139A52C3012AFF413AF8910D0F4A90022034139282B3860282B18600B08480890 +:20606000C220A900035B2868E220A91E22034139A52C3014AFF413AF2940C940D0F2A900E8 +:2060800022034139282B3860282B18600B084808C220A900035B2868E220A91E2203413967 +:2060A000A52C3014AFF413AF29C0C980D0F2A90022034139282B3860282B1860DA08C210C0 +:2060C000A2803EEACAE00000D0F928FA6BDA8B0B084808E220A90048AB28684808C220A9A5 +:2060E00000035B286822BC6039E230A200A9009D1005E8E010D0F8AFF413AF29C0C980F005 +:2061000004221A6239E210A20020D25FB003825E00BD00058FF513AF22BC6039E8EC3005A4 +:20612000D0E7AD3305D003828000103CA50B3003823C00AFF413AF8980F0F18920D00382B4 +:206140006800C210A00000A50B3003822100AFF413AF8920F0548980F0EDB7268FF513AF84 +:20616000C8C00002D0E18042205C60A50B3007E220A98C829C00AFF413AF29C0C9C0D0EB78 +:20618000AFF413AF8920D003828300C210A00000A50B10DBAFF413AF29C0C9C0D0F2AFF5CF +:2061A00013AF9726C8C00002D0E6AD3205F034E210A200A91E22034139205C6090B1AFF55D +:2061C00013AF205C6090A8AFF513AF9D100520D25F909CAFF413AF2950C950D006E8EC3281 +:2061E00005D0E4C210A20A0022191639AFF413AF8910F012205C60B0038273FFAFF513AFF5 +:206200009D1005E880DD6420282BABFA386BE220A9858520282BABFA186B08C210E220A993 +:20622000008FF213AFA2E803A0000022261639A9048FF213AFEAEAEAEAA9008FF413AFA928 +:20624000008FF713AFA28FC5A0200022261639222A63399025222A6339901F222A633990FD +:2062600019222A6339901322EC6339900D2293633990072296623928386B28186B08C22098 +:2062800078A984038F4EA038E220AF4C010029FE8F4C0100286B08227D6239E220AFF21315 +:2062A000AF8910D01FA9148FF213AF20D25F9017A21E8BA0410022261639AF0B03000980A6 +:2062C0008F0B030028386B28186B08E220A9048FF213AFC22078A900008F4EA038E220AF48 +:2062E0004C010009018F4C0100AF0B0300297F8F0B0300286B0B084808C220A900035B2862 +:2063000068227D6239E220A9078D0005A5008D0105A9028D30059C33059C320522CD6039C3 +:206320009004282B386B282B186B8B0B084808E220A90048AB28684808C220A900035B2880 +:2063400068C230A20A0022191639E2206406A9FF850A202E60903020D25F902BA9088FF55B +:2063600013AF205C60902020D25F901BAFF513AF850620D25F9010AFF513AF850AE2209C5E +:206380002003282BAB386BE220A98C8D2003282BAB186B8B0B084808E220A90048AB2868B5 +:2063A0004808C220A900035B2868C230A20A0022191639E220202E60902620D25F9021A9DB +:2063C000038FF513AF20D25F9016A9CF8FF513AF20D25F900BA9018FF513AF282BAB386B42 +:2063E000E220A98C8D2003282BAB186B8B0B084808E220A90048AB28684808C220A900033B +:206400005B2868C230A20A0022191639E220202E60903620D25F9031A9138FF513AF20D2ED +:206420005F9026A9008FF513AF20D25F901BA9448FF513AF20D25F9010A9008FF513AF2029 +:206440002E609005282BAB386BE220A98C8D2003282BAB186B8B0B084808E220A90048AB84 +:2064600028684808C220A900035B2868E220A90A8D0005A9018D30059C3305A9078D3205C8 +:2064800022CD60399027AD10058506AD11058507AD12058508AD13058502AD14058501AD8B +:2064A0001505850AAD16058504282BAB6B282BAB186B0B08E220A90E8D0005A9018D30052E +:2064C0009C3305A90A8D320522CD60399003282B6B282B186B8B0B084808E220A90048AB36 +:2064E00028684808C220A900035B2868227D6239E220A90F8D0005A50129010A0A05008D47 +:206500000105A5028D0205A9038D30059C33059C320522CD60399005282BAB386B282BAB69 +:20652000186B8B0B084808E220A90048AB28684808C220A900035B2868227D6239E220A90E +:206540000609408D0005A50129010A0A05008D0105A5028D0205A5018D0305A5038D04052A +:20656000A9028D0505A9128D0605A91B8D0705A9FF8D0805A9098D3005A9018D3305A90754 +:206580008D320522CD603908AD10058506AD11058507AD12058508AD13058502AD14058523 +:2065A00001AD1505850AAD16058504289004282BAB6B282BAB186B8B0B084808E220A900F4 +:2065C00048AB28684808C220A900035B2868E220227D6239A90509408D0005A50129010AD0 +:2065E0000A05008D0105A5028D0205A5018D0305A5038D0405A9028D0505A9128D0605A907 +:206600001B8D0705A9FF8D0805A9098D3005A9FF8D3305A9078D320522CD603908AD1005DD +:206620008506AD11058507AD12058508AD13058502AD14058501AD1505850AAD16058504F0 +:20664000289004282BAB6B282BAB186BDA5A0B084808C220A90C035B2868C2306408640AAC +:20666000A22000060026022608260AA50838E504A8A50AE5069006850A8408E600CAD0E3A8 +:20668000282B7AFA608B0B084808E220A90048AB28684808C220A900035B2868C230A52235 +:2066A000850CA524850EA9240085106412204C66E220A50C8502C220A514850CA516850E8F +:2066C000A9120085106412204C66E220A50C29018501A5141A8503282BAB6B8B0B0848080D +:2066E000E220A90048AB28684808C220A900035B2868E220A9038D3405C23022856639E215 +:2067000020A503F029C220222265399014E220A50629D0D019E220A9008D2003282BAB3810 +:206720006BE220CE34053013221A623980D7E220A9828004E220A9848D2003282BAB186B63 +:206740008B0B084808E220A90048AB28684808C220A900035B2868E220A9038D3405C230EE +:206760002285663922B76539B003822800E220A50629D0D00CE220A9008D2003282BAB38EC +:206780006BE220A5078902F004A98680178910D0E48980D0E0E220CE3405D0C8A983800444 +:2067A000E220A9848D2003282BAB186B8B0B084808E220A90048AB28684808C220A900037F +:2067C0005B2868221A6239E220C210A900A200009F00A338E8E00002D0F6A90085002296E8 +:2067E0006239C230A9000085228524A900A38526A93800852822DB6639B00382D300E220E8 +:20680000A9008F01A038A9008F02A038E220AF0DA3388F03A038C220A900008F04A0388FCD +:2068200006A038AF16A3388F10A038A900008F12A038A901008F14A038186F10A0388F1806 +:20684000A038A900008F16A0388F1AA03818AF18A0386F10A0388F20A038A900008F22A02A +:2068600038AF11A3388F24A0384A4A4A4A186F20A0388F1CA038A900008F1EA038AF13A3FD +:20688000388F08A038A900008F0AA038AF0EA3388F0CA038A900028F0EA038E220AF26A392 +:2068A00038C9298014C220AF27A3388F26A038AF29A3388F28A038800DC220A900008F26EB +:2068C000A0388F28A038E220A9008520282BAB386B282BAB186B8B0B084808E220A90048FE +:2068E000AB28684808C220A900035B2868E230E001F00FE002F011E003F0136420282BAB57 +:20690000386B2296623980F322CA623980ED22F56239B0E7282BAB186B0B084808C220A962 +:2069200000035B286822966239E220AFF713AF8980F042A9008500A9008501A95085022272 +:20694000D564399034C210A21E8BA0410022261639222A6339A50629D0D01E22F5623990B0 +:2069600018A21E8BA0410022261639222A6339A50629D0D004282B386B282B186B8B0B0872 +:206980004808E220A90048AB28684808C220A920035B286822AC6739C230A90000A20000E5 +:2069A0009F00A338E8E8E00002D0F5E220A20000BF656A399F00A338E8E0C900D0F2A0000E +:2069C00000A24000B73C9F00A338F007E8C8C08000D0F1C220A955AA8FFEA438C220A90042 +:2069E000A38506A938008508A9000085028504E220A900850122241000B00922CA62392853 +:206A00002BAB186B22CA6239E220A9008500282BAB386B08E220AF4EA038D006AF4FA0383A +:206A2000F028AF4EA0383A8F4EA038C9FFD00BAF4FA0383A8F4FA0388010AF4EA038D00AD2 +:206A4000AF4FA038D00422CA6239E220AF2D0300F0113A8F2D0300D00AAF2C030009808F5A +:206A60002C0300286BEB009043323536444F5320000201010002E000400BF00900120002B5 +:206A800000000000000000000000002978563412554E5449544C45442020204641543132B2 +:056AA0002020208040D1 +:206AE500C220A940A38F600300A938008F62030022925939B00CE2204BAB620800FA221CC0 +:206B05001000EA80FD436F756C64206E6F742066696E64206120626F6F7461626C65206265 +:206B2500696E6172792E0D0008C220A900A38F260300A938008F280300225B6C39B0038212 +:206B4500AB00C210E220A02800A23600BF01A33822181000BF00A33822181000E8E8888868 +:206B6500D0EAC210E220A01400A21400BF01A33822181000BF00A33822181000E8E888886F +:206B8500D0EA226C1000C230A901008F220300A900008F240300A900A38F260300A9380004 +:206BA5008F280300A20000A9A55A9F00A338E8E8E00002D0F5227A6D39B006226C100080C5 +:206BC5002CA901008F220300A900008F240300A900A58F260300A938008F28030022E96CAF +:206BE50039B006226C10008004226C1000286BE22020176CA9008F35E8AF8F34E8AF8F328A +:206C0500E8AFA9018F33E8AFA9A08F36E8AF20356C6B08E220AF37E8AF2980C980F0F6287D +:206C25006008E220AF37E8AF2940C940D0F6286008E220AF37E8AF29C0C940D0F6283860A9 +:206C45008F07030028186008E220AF37E8AF2908C908D0F628605A8B0B084808E220A9002C +:206C650048AB28684808C220A920035B2868E22020356CA505290709A08F36E8AF20356C40 +:206C8500E220A9008F32E8AF8F33E8AF8F34E8AF8F35E8AFA9EC8F37E8AFF02920176C2010 +:206CA500356C902DC230A00000AF38E8AF9706C8C8C00002D0F3E220A90085008D060328C1 +:206CC5002BAB7A386BE220A987800AE220A98A8004E220A9828500AF31E8AF8D0603282B35 +:206CE500AB7A186B5A8B0B084808E220A90048AB28684808C220A920035B2868E220203531 +:206D05006CA505290709E08F36E8AF20356CE220A9018F32E8AFA5028F33E8AFA5038F34B3 +:206D2500E8AFA5048F35E8AFA9218F37E8AFEAEAEAEA20356C902BE220AF30E8AFA0000050 +:206D4500C220AF38E8AF9706C8C8C00002D0F3EAEAEAEAE220A90085008D0603282BAB7A36 +:206D6500386BE220AF31E8AF8D0603A9828500282BAB7A186B5A8B0B084808E220A9004876 +:206D8500AB28684808C220A920035B2868E22020356CA505290709E08F36E8AF20356CE245 +:206DA50020A9018F32E8AFA5028F33E8AFA5038F34E8AFA5048F35E8AFA9308F37E8AFEA86 +:206DC500EAEAEA20356C9033C230A00000B7068F38E8AFC8C8C00002D0F3EAEAEAEA2035AD +:206DE5006C9018AF37E8AF892100D00FE220A90085008D0603282BAB7A386BE220AF31E8C9 +:206E0500AF8D0603A9828500282BAB7A186B202020200B0C0B0C0B0C0B0C0B0C2046464698 +:206E250046464646204D4D4D4D4D4D4D4D20585820202020585858200D2020200B0C0B0C9A +:206E45000B0C0B0C0B0C2046462020202020204D4D204D4D204D4D20202058582058585836 +:206E65002020200D20200B0C0B0C0B0C0B0C0B0C2046464646462020204D4D204D4D204D4E +:206E85004D202020205858582020202020200D200B0C0B0C0B0C0B0C0B0C204646202020AC +:206EA5002020204D4D204D4D204D4D20205858582020585820202020200D0B0C0B0C0B0C35 +:206EC5000B0C0B0C2046462020202020204D4D204D4D204D4D20585858202020202058588D +:206EE500202020200D0D4332353620464F454E495820464D58202D2D20332C3637302C302D +:206F0500313620427974657320467265650D7777772E63323536666F656E69782E636F6DA6 +:206F2500202D204B65726E656C2076657273696F6E3A2076302E312E302D616C7068612B3D +:206F4500313031312028323032302D31322D3331290D001D1D1D1D1D1D8D8D4D4D2D2D5DED +:206F65005DFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD1D1D1DAC +:206F85001D1D8D8D4D4D2D2D5D5DFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD2C +:206FA500FDFDFDFDFDFDFD1D1D1D1D8D8D4D4D2D2D5D5DFDFDFDFDFDFDFDFDFDFDFDFDFDCC +:206FC500FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD1D1D1D8D8D4D4D2D2D5D5DFDFDFDFDCC +:206FE500FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD1D1D8D8D4D3C +:207005004D2D2D5D5DFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD5B +:20702500FDFDFDFDFD000000FF000080FF008000FF800000FF008080FF808000FF800080E0 +:20704500FF808080FF0045FFFF13458BFF000020FF002000FF200000FF202020FF4040400C +:20706500FFFFFFFFFF000000FF000080FF008000FF800000FF002020FF202000FF200020D6 +:20708500FF202020FF1E69D2FF13458BFF000020FF002000FF400000FF101010FF404040E7 +:2070A500FFFFFFFFFF436D6420307841412054657374207061737365642E2E2E0D00436DCB +:2070C5006420307841422054657374207061737365642E2E2E0D00436D64203078363020A3 +:2070E50045786563757465642E0D00436D642030784646202852657365742920446F6E6597 +:207105002E0D00436D642030784545204563686F2054657374207061737365642E2E2E0D33 +:20712500004B6579626F6172642050726573656E740D004E6F204B6579626F61726420419C +:2071450074746163686564206F72204661696C656420496E69742E2E2E0D004E4F20534943 +:20716500474E415455524520464F554E442E00424D50204C4F414445442E004558454355DA +:2071850054494E4720424D502050415253455200494445204844442050726573656E743ACF +:2071A50000426F6F7420444950207377697463682073657474696E67732061726520696EA7 +:2071C50076616C69642E005072657373205220746F2072657472792C204220746F20676F0D +:2071E50020746F2042415349432E0D00556E61626C6520746F2072656164207468652053E0 +:207205004420636172642E00556E61626C6520746F20726561642066726F6D2074686520D2 +:207225004944452064726976652E00556E61626C6520746F20726561642066726F6D207491 +:20724500686520666C6F7070792064726976652E00426F6F74696E672066726F6D20666CA2 +:207265006F7070792E2E2E000D52454144592E0041424F5254204552524F5200303132331F +:0D7285003435363738394142434445460020 :20730000001B313233343536373839302D3D080971776572747975696F705B5D0D006173C8 :20732000646667686A6B6C3B2760005C7A786376626E6D2C2E2F002A0020008182838485EB :20734000868788898A0000001100009D001D0000910000000000008B8C0000000000000012 diff --git a/bin/Release/roms/kernel.lst b/bin/Release/roms/kernel.lst index 30b3202..3e1bbea 100644 --- a/bin/Release/roms/kernel.lst +++ b/bin/Release/roms/kernel.lst @@ -1,7 +1,7 @@ ; 64tass Turbo Assembler Macro V1.54.1900 listing file ; 64tass --m65816 -D TARGET=1 --long-address --flat -b -o kernel.bin --list kernel.lst --labels=kernel.lbl src\kernel.asm -; Wed Sep 30 14:48:19 2020 +; Thu Dec 31 14:28:45 2020 ;Offset ;PC ;Hex ;Monitor ;Source @@ -1800,26 +1800,26 @@ .3810e4 10e4 5c 1c 14 39 jmp $39141c BMP_PARSER JML IBMP_PARSER .3810e8 10e8 5c d1 13 39 jmp $3913d1 BM_FILL_SCREEN JML IBM_FILL_SCREEN .3810ec 10ec 5c 5f 37 39 jmp $39375f OPL2_TONE_TEST JML IOPL2_TONE_TEST -.3810f0 10f0 5c 30 54 39 jmp $395430 F_OPEN JML IF_OPEN ; open a file for reading/writing/creating -.3810f4 10f4 5c c3 54 39 jmp $3954c3 F_CREATE JML IF_CREATE ; create a new file -.3810f8 10f8 5c fd 54 39 jmp $3954fd F_CLOSE JML IF_CLOSE ; close a file (make sure last cluster is written) -.3810fc 10fc 5c 96 55 39 jmp $395596 F_WRITE JML IF_WRITE ; write the current cluster to the file -.381100 1100 5c 31 55 39 jmp $395531 F_READ JML IF_READ ; read the next cluster from the file -.381104 1104 5c 40 56 39 jmp $395640 F_DELETE JML IF_DELETE ; delete a file / directory -.381108 1108 5c 02 56 39 jmp $395602 F_DIROPEN JML IF_DIROPEN ; open a directory and seek the first directory entry -.38110c 110c 5c 3c 56 39 jmp $39563c F_DIRNEXT JML IF_DIRNEXT ; seek to the next directory of an open directory -.381110 1110 5c d9 56 39 jmp $3956d9 F_DIRREAD JML IF_DIRREAD ; Read the directory entry for the specified file -.381114 1114 5c 00 57 39 jmp $395700 F_DIRWRITE JML IF_DIRWRITE ; Write any changes in the current directory cluster back to the drive -.381118 1118 5c 04 57 39 jmp $395704 F_LOAD JML IF_LOAD ; load a binary file into memory, supports multiple file formats -.38111c 111c 5c f4 58 39 jmp $3958f4 F_SAVE JML IF_SAVE ; Save memory to a binary file +.3810f0 10f0 5c 35 54 39 jmp $395435 F_OPEN JML IF_OPEN ; open a file for reading/writing/creating +.3810f4 10f4 5c c8 54 39 jmp $3954c8 F_CREATE JML IF_CREATE ; create a new file +.3810f8 10f8 5c 02 55 39 jmp $395502 F_CLOSE JML IF_CLOSE ; close a file (make sure last cluster is written) +.3810fc 10fc 5c 9b 55 39 jmp $39559b F_WRITE JML IF_WRITE ; write the current cluster to the file +.381100 1100 5c 36 55 39 jmp $395536 F_READ JML IF_READ ; read the next cluster from the file +.381104 1104 5c 45 56 39 jmp $395645 F_DELETE JML IF_DELETE ; delete a file / directory +.381108 1108 5c 07 56 39 jmp $395607 F_DIROPEN JML IF_DIROPEN ; open a directory and seek the first directory entry +.38110c 110c 5c 41 56 39 jmp $395641 F_DIRNEXT JML IF_DIRNEXT ; seek to the next directory of an open directory +.381110 1110 5c de 56 39 jmp $3956de F_DIRREAD JML IF_DIRREAD ; Read the directory entry for the specified file +.381114 1114 5c 05 57 39 jmp $395705 F_DIRWRITE JML IF_DIRWRITE ; Write any changes in the current directory cluster back to the drive +.381118 1118 5c 09 57 39 jmp $395709 F_LOAD JML IF_LOAD ; load a binary file into memory, supports multiple file formats +.38111c 111c 5c f9 58 39 jmp $3958f9 F_SAVE JML IF_SAVE ; Save memory to a binary file .381120 1120 5c 29 41 39 jmp $394129 CMDBLOCK JML ICMDBLOCK ; Send a command to a block device -.381124 1124 5c 8d 59 39 jmp $39598d F_RUN JML IF_RUN ; Load an run a binary file +.381124 1124 5c 92 59 39 jmp $395992 F_RUN JML IF_RUN ; Load an run a binary file .381128 1128 5c 54 45 39 jmp $394554 F_MOUNT JML DOS_MOUNT ; Mount the designated block device .38112c 112c 5c 78 0d 39 jmp $390d78 SETSIZES JML ISETSIZES -.381130 1130 5c b6 5a 39 jmp $395ab6 F_COPY JML IF_COPY ; Copy a file -.381134 1134 5c 18 5a 39 jmp $395a18 F_ALLOCFD JML IF_ALLOCFD ; Allocate a file descriptor -.381138 1138 5c 6c 5a 39 jmp $395a6c F_FREEFD JML IF_FREEFD ; Free a file descriptor -.381700 1700 5c 0e 6a 39 jmp $396a0e VEC_INT00_SOF JML FDC_TIME_HANDLE ; IRQ 0, 0 --- Start Of Frame interrupt +.381130 1130 5c bb 5a 39 jmp $395abb F_COPY JML IF_COPY ; Copy a file +.381134 1134 5c 1d 5a 39 jmp $395a1d F_ALLOCFD JML IF_ALLOCFD ; Allocate a file descriptor +.381138 1138 5c 71 5a 39 jmp $395a71 F_FREEFD JML IF_FREEFD ; Free a file descriptor +.381700 1700 5c 13 6a 39 jmp $396a13 VEC_INT00_SOF JML FDC_TIME_HANDLE ; IRQ 0, 0 --- Start Of Frame interrupt .381704 1704 5c e5 16 39 jmp $3916e5 VEC_INT01_SOL JML IRQHANDLESTUB ; IRQ 0, 1 --- Start Of Line interrupt .381708 1708 5c e5 16 39 jmp $3916e5 VEC_INT02_TMR0 JML IRQHANDLESTUB ; IRQ 0, 2 --- Timer 0 interrupt .38170c 170c 5c e5 16 39 jmp $3916e5 VEC_INT03_TMR1 JML IRQHANDLESTUB ; IRQ 0, 3 --- Timer 1 interrupt @@ -2360,11 +2360,11 @@ .3904c9 22 a0 0f 39 jsl $390fa0 JSL IINITFONTSET .3904cd 22 42 0b 39 jsl $390b42 JSL ICLRSCREEN ; Clear Screen and Set a standard color in Color Memory .3904d1 a9 01 00 lda #$0001 LDA #CHAN_COM1 ; Initialize COM1 -.3904d4 22 cd 5b 39 jsl $395bcd JSL UART_SELECT -.3904d8 22 39 5c 39 jsl $395c39 JSL UART_INIT +.3904d4 22 d2 5b 39 jsl $395bd2 JSL UART_SELECT +.3904d8 22 3e 5c 39 jsl $395c3e JSL UART_INIT .3904dc a9 02 00 lda #$0002 LDA #CHAN_COM2 ; Initialize COM2 -.3904df 22 cd 5b 39 jsl $395bcd JSL UART_SELECT -.3904e3 22 39 5c 39 jsl $395c39 JSL UART_INIT +.3904df 22 d2 5b 39 jsl $395bd2 JSL UART_SELECT +.3904e3 22 3e 5c 39 jsl $395c3e JSL UART_INIT .3904e7 a9 00 00 lda #$0000 LDA #0 .3904ea 22 38 10 00 jsl $001038 JSL SETIN .3904ee 22 3c 10 00 jsl $00103c JSL SETOUT @@ -2382,7 +2382,7 @@ .390507 ab plb PLB .390508 28 plp PLP .390509 68 pla PLA ; end setdbr macro -.39050a a2 0e 6e ldx #$6e0e LDX #<>greet_msg +.39050a a2 13 6e ldx #$6e13 LDX #<>greet_msg .39050d 22 7e 07 39 jsl $39077e JSL IPRINT ; print the first line .390511 22 8d 0b 39 jsl $390b8d JSL ICOLORFLAG ; This is to set the Color Memory for the Logo .390515 48 pha PHA ; begin setdp macro @@ -2462,7 +2462,7 @@ .3905bf 90 06 bcc $3905c7 BCC sdc_error ; Print an error message if couldn't get anything .3905c1 22 0f 47 39 jsl $39470f JSL DOS_TESTBOOT ; Try to boot from the SDC's MBR .3905c5 80 e5 bra $3905ac BRA BOOTBASIC ; If we couldn't fall, into BASIC -.3905c7 a2 ec 71 ldx #$71ec sdc_error LDX #<>sdc_err_boot ; Print a message saying SD card booting is not implemented +.3905c7 a2 f1 71 ldx #$71f1 sdc_error LDX #<>sdc_err_boot ; Print a message saying SD card booting is not implemented .3905ca 80 39 bra $390605 BRA PR_BOOT_ERROR .3905cc BOOTIDE .3905cc e2 20 sep #$20 SEP #$20 ; set A short @@ -2472,20 +2472,20 @@ .3905d8 90 07 bcc $3905e1 BCC hdc_error ; Print an error message if couldn't get anything .3905da 22 0f 47 39 jsl $39470f JSL DOS_TESTBOOT ; Try to boot from the IDE's MBR .3905de 82 cb ff brl $3905ac BRL BOOTBASIC ; If we couldn't fall, into BASIC -.3905e1 a2 08 72 ldx #$7208 hdc_error LDX #<>ide_err_boot ; Print a message saying SD card booting is not implemented +.3905e1 a2 0d 72 ldx #$720d hdc_error LDX #<>ide_err_boot ; Print a message saying SD card booting is not implemented .3905e4 80 1f bra $390605 BRA PR_BOOT_ERROR -.3905e6 a2 51 72 ldx #$7251 BOOTFLOPPY LDX #<>fdc_boot +.3905e6 a2 56 72 ldx #$7256 BOOTFLOPPY LDX #<>fdc_boot .3905e9 22 7e 07 39 jsl $39077e JSL IPRINT .3905ed e2 20 sep #$20 SEP #$20 ; set A short .3905ef a9 00 lda #$00 LDA #BIOS_DEV_FDC .3905f1 8f 21 03 00 sta $000321 STA @l BIOS_DEV -.3905f5 22 a7 67 39 jsl $3967a7 JSL FDC_MOUNT ; Mount the floppy drive +.3905f5 22 ac 67 39 jsl $3967ac JSL FDC_MOUNT ; Mount the floppy drive .3905f9 90 07 bcc $390602 BCC fdc_error ; Print an error message if couldn't get anything .3905fb 22 0f 47 39 jsl $39470f JSL DOS_TESTBOOT ; Try to boot from the FDC's MBR .3905ff 82 aa ff brl $3905ac BRL BOOTBASIC ; If we couldn't, fall into BASIC -.390602 a2 2b 72 ldx #$722b fdc_error LDX #<>fdc_err_boot ; Print a message saying SD card booting is not implemented +.390602 a2 30 72 ldx #$7230 fdc_error LDX #<>fdc_err_boot ; Print a message saying SD card booting is not implemented .390605 22 7e 07 39 jsl $39077e PR_BOOT_ERROR JSL IPRINT ; Print the error message in X -.390609 a2 c7 71 ldx #$71c7 LDX #<>boot_retry ; Print the boot retry prompt +.390609 a2 cc 71 ldx #$71cc LDX #<>boot_retry ; Print the boot retry prompt .39060c 22 7e 07 39 jsl $39077e JSL IPRINT .390610 22 21 07 39 jsl $390721 boot_wait_key JSL IGETCHW ; Wait for a keypress .390614 c9 52 cmp #$52 CMP #'R' ; Was "R" pressed? @@ -2580,7 +2580,7 @@ .3906f3 28 plp PLP .3906f4 68 pla PLA ; end setdbr macro .3906f5 e2 20 sep #$20 SEP #$20 ; set A short -.3906f7 a2 68 72 ldx #$7268 LDX #<>ready_msg +.3906f7 a2 6d 72 ldx #$726d LDX #<>ready_msg .3906fa 22 7e 07 39 jsl $39077e JSL IPRINT .3906fe IREADYWAIT .3906fe 22 18 07 39 jsl $390718 JSL IGETCHE @@ -2613,8 +2613,8 @@ .390734 28 plp PLP .390735 38 sec SEC ; And return carry set .390736 6b rtl RTL -.390737 22 cd 5b 39 jsl $395bcd getc_uart JSL UART_SELECT ; Select the correct COM port -.39073b 22 81 5c 39 jsl $395c81 JSL UART_GETC ; Get the charater from the COM port +.390737 22 d2 5b 39 jsl $395bd2 getc_uart JSL UART_SELECT ; Select the correct COM port +.39073b 22 86 5c 39 jsl $395c86 JSL UART_GETC ; Get the charater from the COM port .39073f 80 04 bra $390745 BRA done .390741 22 7e 1a 38 jsl $381a7e getc_keyboard JSL KBD_GETC ; Get the character from the keyboard .390745 28 plp done PLP @@ -2703,9 +2703,9 @@ .3907c8 f0 03 beq $3907cd BEQ putc_uart ; Yes: handle printing to the UART .3907ca 68 pla PLA ; Otherwise, just exit .3907cb 80 57 bra $390824 BRA done -.3907cd 22 cd 5b 39 jsl $395bcd putc_uart JSL UART_SELECT ; Point to the correct UART +.3907cd 22 d2 5b 39 jsl $395bd2 putc_uart JSL UART_SELECT ; Point to the correct UART .3907d1 68 pla PLA ; Recover the character to send -.3907d2 22 a2 5c 39 jsl $395ca2 JSL UART_PUTC ; Send the character +.3907d2 22 a7 5c 39 jsl $395ca7 JSL UART_PUTC ; Send the character .3907d6 80 4c bra $390824 BRA done .3907d8 68 pla putc_screen PLA ; Get the character to print .3907d9 c9 0a cmp #$0a CMP #CHAR_LF ; Linefeed moves cursor down one line @@ -2907,7 +2907,7 @@ .39093e c9 02 cmp #$02 CMP #CHAN_COM2 ; Check to see if it's the COM2 port .390940 f0 02 beq $390944 BEQ uart_printcr ; Yes: handle printing to the UART .390942 80 1c bra $390960 BRA done -.390944 22 cd 5b 39 jsl $395bcd uart_printcr JSL UART_SELECT +.390944 22 d2 5b 39 jsl $395bd2 uart_printcr JSL UART_SELECT .390948 a9 0d lda #$0d LDA #CHAR_CR .39094a 22 9e 07 39 jsl $39079e JSL IPUTC .39094e a9 0a lda #$0a LDA #CHAR_LF @@ -3208,7 +3208,7 @@ .390b32 c2 20 rep #$20 REP #$20 ; set A long .390b34 29 0f 00 and #$000f AND #$0F .390b37 aa tax TAX -.390b38 bf 7c 72 39 lda $39727c,x LDA hex_digits,X +.390b38 bf 81 72 39 lda $397281,x LDA hex_digits,X .390b3c 22 9e 07 39 jsl $39079e JSL IPUTC ; Print the digit .390b40 fa plx PLX .390b41 6b rtl RTL @@ -3273,7 +3273,7 @@ .390ba2 85 04 sta $04 STA TMPPTR2 .390ba4 a9 af 00 lda #$00af LDA #`CS_COLOR_MEM_PTR .390ba7 85 06 sta $06 STA TMPPTR2+2 -.390ba9 a9 53 6f lda #$6f53 LDA #<>greet_clr_line1 +.390ba9 a9 58 6f lda #$6f58 LDA #<>greet_clr_line1 .390bac 85 00 sta $00 STA TMPPTR1 .390bae a9 39 00 lda #$0039 LDA #`greet_clr_line1 .390bb1 85 02 sta $02 STA TMPPTR1+2 @@ -3282,7 +3282,7 @@ .390bb7 a5 04 lda $04 LDA TMPPTR2 .390bb9 65 11 adc $11 ADC COLS_PER_LINE .390bbb 85 04 sta $04 STA TMPPTR2 -.390bbd a9 7d 6f lda #$6f7d LDA #<>greet_clr_line2 +.390bbd a9 82 6f lda #$6f82 LDA #<>greet_clr_line2 .390bc0 85 00 sta $00 STA TMPPTR1 .390bc2 a9 39 00 lda #$0039 LDA #`greet_clr_line2 .390bc5 85 02 sta $02 STA TMPPTR1+2 @@ -3291,7 +3291,7 @@ .390bcb a5 04 lda $04 LDA TMPPTR2 .390bcd 65 11 adc $11 ADC COLS_PER_LINE .390bcf 85 04 sta $04 STA TMPPTR2 -.390bd1 a9 a7 6f lda #$6fa7 LDA #<>greet_clr_line3 +.390bd1 a9 ac 6f lda #$6fac LDA #<>greet_clr_line3 .390bd4 85 00 sta $00 STA TMPPTR1 .390bd6 a9 39 00 lda #$0039 LDA #`greet_clr_line3 .390bd9 85 02 sta $02 STA TMPPTR1+2 @@ -3300,7 +3300,7 @@ .390bdf a5 04 lda $04 LDA TMPPTR2 .390be1 65 11 adc $11 ADC COLS_PER_LINE .390be3 85 04 sta $04 STA TMPPTR2 -.390be5 a9 d1 6f lda #$6fd1 LDA #<>greet_clr_line4 +.390be5 a9 d6 6f lda #$6fd6 LDA #<>greet_clr_line4 .390be8 85 00 sta $00 STA TMPPTR1 .390bea a9 39 00 lda #$0039 LDA #`greet_clr_line4 .390bed 85 02 sta $02 STA TMPPTR1+2 @@ -3309,7 +3309,7 @@ .390bf3 a5 04 lda $04 LDA TMPPTR2 .390bf5 65 11 adc $11 ADC COLS_PER_LINE .390bf7 85 04 sta $04 STA TMPPTR2 -.390bf9 a9 fb 6f lda #$6ffb LDA #<>greet_clr_line5 +.390bf9 a9 00 70 lda #$7000 LDA #<>greet_clr_line5 .390bfc 85 00 sta $00 STA TMPPTR1 .390bfe a9 39 00 lda #$0039 LDA #`greet_clr_line5 .390c01 85 02 sta $02 STA TMPPTR1+2 @@ -3328,13 +3328,13 @@ .390c11 e2 20 sep #$20 SEP #$20 ; set A short .390c13 e2 10 sep #$10 SEP #$10 ; set X short .390c15 a2 00 ldx #$00 LDX #$00 -.390c17 bf 25 70 39 lda $397025,x lutinitloop0 LDA @lfg_color_lut,x ; get Local Data +.390c17 bf 2a 70 39 lda $39702a,x lutinitloop0 LDA @lfg_color_lut,x ; get Local Data .390c1b 9f 40 1f af sta $af1f40,x STA FG_CHAR_LUT_PTR,x ; Write in LUT Memory .390c1f e8 inx inx .390c20 e0 40 cpx #$40 cpx #$40 .390c22 d0 f3 bne $390c17 bne lutinitloop0 .390c24 a2 00 ldx #$00 LDX #$00 -.390c26 bf 65 70 39 lda $397065,x lutinitloop1 LDA @lbg_color_lut,x ; get Local Data +.390c26 bf 6a 70 39 lda $39706a,x lutinitloop1 LDA @lbg_color_lut,x ; get Local Data .390c2a 9f 80 1f af sta $af1f80,x STA BG_CHAR_LUT_PTR,x ; Write in LUT Memory .390c2e e8 inx INX .390c2f e0 40 cpx #$40 CPX #$40 @@ -3881,10 +3881,10 @@ .391191 af 4c 01 00 lda $00014c LDA @lINT_MASK_REG0 .391195 29 7f and #$7f AND #~FNX0_INT07_MOUSE .391197 8f 4c 01 00 sta $00014c STA @lINT_MASK_REG0 -.39119b a2 21 71 ldx #$7121 LDX #<>Success_kb_init +.39119b a2 26 71 ldx #$7126 LDX #<>Success_kb_init .39119e 38 sec SEC .39119f b0 03 bcs $3911a4 BCS InitSuccess -.3911a1 a2 33 71 ldx #$7133 initkb_loop_out LDX #<>Failed_kb_init +.3911a1 a2 38 71 ldx #$7138 initkb_loop_out LDX #<>Failed_kb_init .3911a4 22 7e 07 39 jsl $39077e InitSuccess JSL IPRINT ; print Message .3911a8 c2 20 rep #$20 REP #$20 ; set A long .3911aa c2 10 rep #$10 REP #$10 ; set X long @@ -4228,10 +4228,10 @@ .391521 af 2a 01 00 lda $00012a LDA @lADDER32_R_HL .391525 85 46 sta $46 STA BMP_PRSE_SRC_PTR+2 .391527 20 97 15 jsr $391597 JSR BMP_PARSER_DMA_SHIT_OUT ; We are going to start with the slow method -.39152a a2 6f 71 ldx #$716f LDX #<>bmp_parser_msg0 +.39152a a2 74 71 ldx #$7174 LDX #<>bmp_parser_msg0 .39152d 80 03 bra $391532 BRA BMP_PARSER_END_NO_ERROR .39152f BMP_PARSER_END_WITH_ERROR -.39152f a2 5b 71 ldx #$715b LDX #<>bmp_parser_err0 +.39152f a2 60 71 ldx #$7160 LDX #<>bmp_parser_err0 .391532 BMP_PARSER_END_NO_ERROR .391532 22 7e 07 39 jsl $39077e JSL IPRINT ; print the first line .391536 6b rtl RTL @@ -7133,7 +7133,7 @@ .394137 a5 01 lda $0321 LDA BIOS_DEV ; Get the device number .394139 c9 00 cmp #$00 CMP #BIOS_DEV_FDC ; Check to see if we're sending to the floppy .39413b d0 06 bne $394143 BNE ret_success ; No: just return -.39413d 22 d1 68 39 jsl $3968d1 JSL FDC_CMDBLOCK ; Yes: call upon the floppy code +.39413d 22 d6 68 39 jsl $3968d6 JSL FDC_CMDBLOCK ; Yes: call upon the floppy code .394141 90 0c bcc $39414f BCC pass_failure .394143 ret_success .394143 e2 20 sep #$20 SEP #$20 ; set A short @@ -7193,13 +7193,13 @@ .394191 7a ply PLY .394192 38 sec SEC ; Return failure .394193 6b rtl RTL -.394194 22 f3 5d 39 jsl $395df3 sd_getblock JSL SDC_GETBLOCK ; Call the SDC GETBLOCK routine +.394194 22 f8 5d 39 jsl $395df8 sd_getblock JSL SDC_GETBLOCK ; Call the SDC GETBLOCK routine .394198 b0 12 bcs $3941ac BCS ret_success .39419a 80 ee bra $39418a BRA ret_failure -.39419c 22 d6 66 39 jsl $3966d6 fd_getblock JSL FDC_GETBLOCK ; Call the FDC GETBLOCK routine +.39419c 22 db 66 39 jsl $3966db fd_getblock JSL FDC_GETBLOCK ; Call the FDC GETBLOCK routine .3941a0 b0 0a bcs $3941ac BCS ret_success .3941a2 80 e6 bra $39418a BRA ret_failure -.3941a4 22 e4 6c 39 jsl $396ce4 hd_getblock JSL IDE_GETBLOCK ; Call the IDE GETBLOCK routine +.3941a4 22 e9 6c 39 jsl $396ce9 hd_getblock JSL IDE_GETBLOCK ; Call the IDE GETBLOCK routine .3941a8 b0 02 bcs $3941ac BCS ret_success .3941aa 80 de bra $39418a BRA ret_failure .3941ac ret_success @@ -7247,13 +7247,13 @@ .3941e5 2b pld PLD .3941e6 18 clc CLC ; Return failure .3941e7 6b rtl RTL -.3941e8 22 93 5e 39 jsl $395e93 sd_putblock JSL SDC_PUTBLOCK ; Call the SDC PUTBLOCK routine +.3941e8 22 98 5e 39 jsl $395e98 sd_putblock JSL SDC_PUTBLOCK ; Call the SDC PUTBLOCK routine .3941ec 90 f1 bcc $3941df BCC ret_failure .3941ee 80 10 bra $394200 BRA ret_success -.3941f0 22 3b 67 39 jsl $39673b fd_putblock JSL FDC_PUTBLOCK ; Call the FDC PUTBLOCK routine +.3941f0 22 40 67 39 jsl $396740 fd_putblock JSL FDC_PUTBLOCK ; Call the FDC PUTBLOCK routine .3941f4 90 e9 bcc $3941df BCC ret_failure .3941f6 80 08 bra $394200 BRA ret_success -.3941f8 22 75 6d 39 jsl $396d75 hd_putblock JSL IDE_PUTBLOCK ; Call the IDE PUTBLOCK routine +.3941f8 22 7a 6d 39 jsl $396d7a hd_putblock JSL IDE_PUTBLOCK ; Call the IDE PUTBLOCK routine .3941fc 90 e1 bcc $3941df BCC ret_failure .3941fe 80 00 bra $394200 BRA ret_success .394200 ret_success @@ -7320,7 +7320,7 @@ .39425e 85 04 sta $0324 STA BIOS_LBA+2 .394260 22 44 10 00 jsl $001044 JSL GETBLOCK ; Get the sector from the FAT12 device .394264 b0 1f bcs $394285 BCS do_success ; If sucessful, set the directory cursor -.394266 82 10 17 brl $395979 BRL IF_PASSFAILURE ; Otherwise: pass up the failure +.394266 82 15 17 brl $39597e BRL IF_PASSFAILURE ; Otherwise: pass up the failure .394269 fetch_fat32 .394269 e2 20 sep #$20 SEP #$20 ; set A short .39426b a9 01 lda #$01 LDA #DOS_DIR_TYPE_FILE ; Set the directory type to file type (all FAT32, any FAT12 subdirectory) @@ -7332,8 +7332,8 @@ .39427a 85 12 sta $0332 STA DOS_CLUS_ID+2 .39427c 22 ec 47 39 jsl $3947ec JSL DOS_GETCLUSTER ; Try to read the first cluster .394280 b0 03 bcs $394285 BCS do_success ; If successful: set the directory cursor -.394282 82 f4 16 brl $395979 BRL IF_PASSFAILURE ; Otherwise: pass up the failure -.394285 82 f8 16 brl $395980 do_success BRL IF_SUCCESS +.394282 82 f9 16 brl $39597e BRL IF_PASSFAILURE ; Otherwise: pass up the failure +.394285 82 fd 16 brl $395985 do_success BRL IF_SUCCESS .394288 DOS_DIRFIRST .394288 0b phd PHD .394289 08 php PHP @@ -7390,10 +7390,10 @@ .3942da 85 2a sta $034a STA DOS_TEMP+2 .3942dc 30 0c bmi $3942ea BMI get_next_block ; Yes: try to fetch the next directory entry .3942de f0 03 beq $3942e3 BEQ check_lower -.3942e0 82 9d 16 brl $395980 BRL IF_SUCCESS +.3942e0 82 a2 16 brl $395985 BRL IF_SUCCESS .3942e3 a5 28 lda $0348 check_lower LDA DOS_TEMP .3942e5 f0 03 beq $3942ea BEQ get_next_block -.3942e7 82 96 16 brl $395980 BRL IF_SUCCESS +.3942e7 82 9b 16 brl $395985 BRL IF_SUCCESS .3942ea get_next_block .3942ea e2 20 sep #$20 SEP #$20 ; set A short .3942ec ad 45 a0 lda $38a045 LDA DOS_DIR_TYPE ; Check the type of the directory @@ -7408,7 +7408,7 @@ .3942ff d0 07 bne $394308 BNE read_sector .394301 e2 20 sep #$20 SEP #$20 ; set A short .394303 a9 00 lda #$00 LDA #0 -.394305 82 6d 16 brl $395975 BRL IF_FAILURE +.394305 82 72 16 brl $39597a BRL IF_FAILURE .394308 read_sector .394308 c2 20 rep #$20 REP #$20 ; set A long .39430a ad 32 a0 lda $38a032 LDA DOS_DIR_BLOCK_ID ; Set the LBA to the sector # @@ -7423,7 +7423,7 @@ .394320 85 1a sta $033a STA DOS_DIR_PTR+2 .394322 22 44 10 00 jsl $001044 JSL GETBLOCK ; Attempt to read the sector from the FAT12 device .394326 b0 39 bcs $394361 BCS do_success ; If successful: set the directory cursor -.394328 82 4e 16 brl $395979 BRL IF_PASSFAILURE ; Otherwise: pass up the failure +.394328 82 53 16 brl $39597e BRL IF_PASSFAILURE ; Otherwise: pass up the failure .39432b next_cluster .39432b c2 20 rep #$20 REP #$20 ; set A long .39432d ad 32 a0 lda $38a032 LDA DOS_DIR_BLOCK_ID ; Get the current block (cluster) ID @@ -7436,17 +7436,17 @@ .39433e a9 38 00 lda #$0038 LDA #`DOS_DIR_CLUSTER .394341 85 1e sta $033e STA DOS_BUFF_PTR+2 .394343 85 1a sta $033a STA DOS_DIR_PTR+2 -.394345 22 f7 4b 39 jsl $394bf7 JSL NEXTCLUSTER ; Try to find the next cluster +.394345 22 fc 4b 39 jsl $394bfc JSL NEXTCLUSTER ; Try to find the next cluster .394349 b0 03 bcs $39434e BCS set_next -.39434b 82 2b 16 brl $395979 BRL IF_PASSFAILURE ; If error: pass it up the chain +.39434b 82 30 16 brl $39597e BRL IF_PASSFAILURE ; If error: pass it up the chain .39434e a5 10 lda $0330 set_next LDA DOS_CLUS_ID ; Save the cluster as the current directory cluster .394350 8d 32 a0 sta $38a032 STA DOS_DIR_BLOCK_ID .394353 a5 12 lda $0332 LDA DOS_CLUS_ID+2 .394355 8d 34 a0 sta $38a034 STA DOS_DIR_BLOCK_ID+2 .394358 22 ec 47 39 jsl $3947ec JSL DOS_GETCLUSTER ; Try to read the first cluster .39435c b0 03 bcs $394361 BCS do_success ; If successful: set the directory cursor -.39435e 82 18 16 brl $395979 BRL IF_PASSFAILURE ; Otherwise: pass up the failure -.394361 82 1c 16 brl $395980 do_success BRL IF_SUCCESS +.39435e 82 1d 16 brl $39597e BRL IF_PASSFAILURE ; Otherwise: pass up the failure +.394361 82 21 16 brl $395985 do_success BRL IF_SUCCESS .394364 DOS_DIRFINDFREE .394364 da phx PHX .394365 5a phy PHY @@ -7468,7 +7468,7 @@ .39437a 5b tcd TCD .39437b 28 plp PLP .39437c 68 pla PLA ; end setdp macro -.39437d 22 02 56 39 jsl $395602 JSL IF_DIROPEN +.39437d 22 07 56 39 jsl $395607 JSL IF_DIROPEN .394381 b0 06 bcs $394389 BCS start_walk .394383 a9 08 00 lda #$0008 LDA #DOS_ERR_NODIR ; Return that we could not read the directory .394386 82 28 00 brl $3943b1 BRL ret_failure @@ -7479,7 +7479,7 @@ .394390 f0 1c beq $3943ae BEQ ret_success ; If 0: we have a blank... return it .394392 c9 e5 cmp #$e5 CMP #DOS_DIR_ENT_UNUSED ; Is it an unused (deleted) entry? .394394 f0 18 beq $3943ae BEQ ret_success ; Yes: return it -.394396 22 3c 56 39 jsl $39563c JSL IF_DIRNEXT ; Go to the next directory entry +.394396 22 41 56 39 jsl $395641 JSL IF_DIRNEXT ; Go to the next directory entry .39439a b0 ed bcs $394389 BCS start_walk ; If we got one, start walking it .39439c 22 b4 43 39 jsl $3943b4 JSL DOS_DIRAPPEND ; If there isn't one, create a blank cluster .3943a0 90 0f bcc $3943b1 BCC ret_failure ; If that didn't work, return the failure @@ -7488,8 +7488,8 @@ .3943a7 85 18 sta $0338 STA DOS_DIR_PTR .3943a9 a9 38 00 lda #$0038 LDA #`DOS_DIR_CLUSTER .3943ac 85 1a sta $033a STA DOS_DIR_PTR+2 -.3943ae 82 cf 15 brl $395980 ret_success BRL IF_SUCCESS -.3943b1 82 c1 15 brl $395975 ret_failure BRL IF_FAILURE +.3943ae 82 d4 15 brl $395985 ret_success BRL IF_SUCCESS +.3943b1 82 c6 15 brl $39597a ret_failure BRL IF_FAILURE .3943b4 DOS_DIRAPPEND .3943b4 da phx PHX .3943b5 8b phb PHB @@ -7536,7 +7536,7 @@ .3943fd 85 10 sta $0330 STA DOS_CLUS_ID .3943ff ad 34 a0 lda $38a034 LDA DOS_DIR_BLOCK_ID+2 .394402 85 12 sta $0332 STA DOS_CLUS_ID+2 -.394404 22 18 50 39 jsl $395018 JSL DOS_APPENDCLUS ; Attempt to append the blank data as a new cluster +.394404 22 1d 50 39 jsl $39501d JSL DOS_APPENDCLUS ; Attempt to append the blank data as a new cluster .394408 90 12 bcc $39441c BCC pass_failure ; If there was an error, pass it up the chain .39440a ad 36 a0 lda $38a036 LDA DOS_NEW_CLUSTER ; Set the block ID of the new directory cluster .39440d 8d 32 a0 sta $38a032 STA DOS_DIR_BLOCK_ID @@ -7591,7 +7591,7 @@ .394458 85 08 sta $0328 STA BIOS_BUFF_PTR+2 .39445a 22 24 10 00 jsl $001024 JSL PUTBLOCK ; Try to write the sector to disk .39445e b0 1f bcs $39447f BCS ret_success -.394460 82 12 15 brl $395975 ret_failure BRL IF_FAILURE +.394460 82 17 15 brl $39597a ret_failure BRL IF_FAILURE .394463 write_cluster .394463 c2 20 rep #$20 REP #$20 ; set A long .394465 ad 32 a0 lda $38a032 LDA DOS_DIR_BLOCK_ID ; Set the DOS_CLUS_ID to the ID of the cluster @@ -7604,7 +7604,7 @@ .394477 85 1e sta $033e STA DOS_BUFF_PTR+2 .394479 22 29 48 39 jsl $394829 JSL DOS_PUTCLUSTER ; Try to write the cluster to disk .39447d 90 e1 bcc $394460 BCC ret_failure -.39447f 82 fe 14 brl $395980 ret_success BRL IF_SUCCESS +.39447f 82 03 15 brl $395985 ret_success BRL IF_SUCCESS ;****** Return to file: src\sdos_fat.asm @@ -7883,15 +7883,15 @@ .394583 a9 80 lda #$80 LDA #BIOS_ERR_BADDEV .394585 85 00 sta $0320 STA BIOS_STATUS .394587 82 7c 01 brl $394706 BRL ret_failure -.39458a 22 a7 67 39 jsl $3967a7 do_fdc_mount JSL FDC_MOUNT ; Attempt to mount the floppy disk +.39458a 22 ac 67 39 jsl $3967ac do_fdc_mount JSL FDC_MOUNT ; Attempt to mount the floppy disk .39458e b0 03 bcs $394593 BCS fdc_success .394590 82 73 01 brl $394706 BRL ret_failure .394593 82 67 01 brl $3946fd fdc_success BRL ret_success -.394596 22 b1 5d 39 jsl $395db1 do_sdc_mount JSL SDC_INIT ; Yes: Initialize access to the SDC +.394596 22 b6 5d 39 jsl $395db6 do_sdc_mount JSL SDC_INIT ; Yes: Initialize access to the SDC .39459a b0 10 bcs $3945ac BCS get_mbr ; Continue if success .39459c a9 04 lda #$04 LDA #DOS_ERR_NOINIT ; Otherwise: return an error .39459e 82 65 01 brl $394706 BRL ret_failure -.3945a1 22 ef 6b 39 jsl $396bef do_ide_mount JSL IDE_INIT ; Yes: Initialize access to the IDE drive +.3945a1 22 f4 6b 39 jsl $396bf4 do_ide_mount JSL IDE_INIT ; Yes: Initialize access to the IDE drive .3945a5 b0 05 bcs $3945ac BCS get_mbr ; Continue if success .3945a7 a9 04 lda #$04 LDA #DOS_ERR_NOINIT ; Otherwise: return an error .3945a9 82 5a 01 brl $394706 BRL ret_failure @@ -8483,2514 +8483,2516 @@ .3949f4 18 clc CLC .3949f5 6b rtl RTL .3949f6 22 54 45 39 jsl $394554 mount JSL DOS_MOUNT -.3949fa get_directory -.3949fa c2 20 rep #$20 REP #$20 ; set A long -.3949fc 22 09 42 39 jsl $394209 JSL DOS_DIROPEN ; Get the directory -.394a00 b0 07 bcs $394a09 BCS scan_entries ; If success: start scanning the directory entries -.394a02 e2 20 sep #$20 SEP #$20 ; set A short -.394a04 a9 08 lda #$08 LDA #DOS_ERR_NODIR ; Otherwise: return a no directory error -.394a06 82 47 00 brl $394a50 BRL ret_failure -.394a09 22 88 42 39 jsl $394288 scan_entries JSL DOS_DIRFIRST ; Move the DIR pointer to the beginning of the sector -.394a0d scan_loop -.394a0d e2 20 sep #$20 SEP #$20 ; set A short -.394a0f a0 00 00 ldy #$0000 LDY #0 -.394a12 b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y ; Check the directory entry -.394a14 d0 05 bne $394a1b BNE chk_unused ; If there's an entry, check to see if it's unused -.394a16 a9 09 lda #$09 LDA #DOS_ERR_NOTFOUND ; If end-of-directory, we couldn't find a match -.394a18 82 35 00 brl $394a50 BRL ret_failure -.394a1b c9 e5 cmp #$e5 chk_unused CMP #DOS_DIR_ENT_UNUSED ; If it's unused... -.394a1d f0 26 beq $394a45 BEQ next_entry ; Go to the next entry -.394a1f a0 0b 00 ldy #$000b LDY #DIRENTRY.ATTRIBUTE ; Check the entry's attributes -.394a22 b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y -.394a24 89 08 bit #$08 BIT #DOS_ATTR_VOLUME ; Is it a volume name? -.394a26 d0 1d bne $394a45 BNE next_entry ; Yes: skip it! -.394a28 29 0f and #$0f AND #DOS_ATTR_LONGNAME -.394a2a c9 0f cmp #$0f CMP #DOS_ATTR_LONGNAME ; Is it a long name field? -.394a2c f0 17 beq $394a45 BEQ next_entry ; Yes: skip it! -.394a2e a2 00 00 ldx #$0000 LDX #0 -.394a31 a0 00 00 ldy #$0000 LDY #DIRENTRY.SHORTNAME -.394a34 b7 18 lda [$0338],y scan_cmp_loop LDA [DOS_DIR_PTR],Y ; Get the X'th character of the entry -.394a36 df 3a a0 38 cmp $38a03a,x CMP DOS_SHORT_NAME,X ; And compare to the X'th character of the name we want -.394a3a d0 09 bne $394a45 BNE next_entry ; If not equal: try the next entry -.394a3c c8 iny INY ; Advance to the next character -.394a3d e8 inx INX -.394a3e e0 0b 00 cpx #$000b CPX #11 ; Did we reach the end of the names? -.394a41 f0 16 beq $394a59 BEQ match ; Yes: we have a match! -.394a43 80 ef bra $394a34 BRA scan_cmp_loop ; No: keep checking -.394a45 22 a3 42 39 jsl $3942a3 next_entry JSL DOS_DIRNEXT ; Try to get the next directory entry -.394a49 90 05 bcc $394a50 BCC ret_failure ; If we're at the end of the directory, return a failure. -.394a4b 82 bf ff brl $394a0d BRL scan_loop ; If found: keep scanning -.394a4e a9 08 lda #$08 bad_dir LDA #DOS_ERR_NODIR ; Otherwise: fail with a NODIR error (maybe something else is better) -.394a50 ret_failure -.394a50 e2 20 sep #$20 SEP #$20 ; set A short -.394a52 85 0e sta $032e STA DOS_STATUS -.394a54 28 plp PLP -.394a55 2b pld PLD -.394a56 ab plb PLB -.394a57 18 clc CLC -.394a58 6b rtl RTL -.394a59 match -.394a59 c2 20 rep #$20 REP #$20 ; set A long -.394a5b a0 1a 00 ldy #$001a LDY #DIRENTRY.CLUSTER_L ; Copy the cluster number from the directory entry -.394a5e b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y -.394a60 85 10 sta $0330 STA DOS_CLUS_ID ; To DOS_CLUS_ID -.394a62 a0 14 00 ldy #$0014 LDY #DIRENTRY.CLUSTER_H -.394a65 b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y -.394a67 85 12 sta $0332 STA DOS_CLUS_ID+2 -.394a69 ret_success -.394a69 e2 20 sep #$20 SEP #$20 ; set A short -.394a6b 64 0e stz $032e STZ DOS_STATUS -.394a6d 28 plp PLP -.394a6e 2b pld PLD -.394a6f ab plb PLB -.394a70 38 sec SEC -.394a71 6b rtl RTL -.394a72 DOS_READFILE -.394a72 8b phb PHB -.394a73 0b phd PHD -.394a74 08 php PHP -.394a75 48 pha PHA ; begin setdbr macro -.394a76 08 php PHP -.394a77 e2 20 sep #$20 SEP #$20 ; set A short -.394a79 a9 00 lda #$00 LDA #0 -.394a7b 48 pha PHA -.394a7c ab plb PLB -.394a7d 28 plp PLP -.394a7e 68 pla PLA ; end setdbr macro -.394a7f 48 pha PHA ; begin setdp macro -.394a80 08 php PHP -.394a81 c2 20 rep #$20 REP #$20 ; set A long -.394a83 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394a86 5b tcd TCD -.394a87 28 plp PLP -.394a88 68 pla PLA ; end setdp macro -.394a89 c2 30 rep #$30 REP #$30 ; set A&X long -.394a8b a5 1e lda $033e LDA DOS_BUFF_PTR+2 -.394a8d 48 pha PHA -.394a8e a5 1c lda $033c LDA DOS_BUFF_PTR -.394a90 48 pha PHA -.394a91 22 d2 49 39 jsl $3949d2 JSL DOS_FINDFILE ; Attempt to find the file's directory entry -.394a95 68 pla PLA -.394a96 85 1c sta $033c STA DOS_BUFF_PTR -.394a98 68 pla PLA -.394a99 85 1e sta $033e STA DOS_BUFF_PTR+2 -.394a9b 90 0f bcc $394aac BCC pass_failure ; If found: try to load the cluster -.394a9d 22 ec 47 39 jsl $3947ec load_cluster JSL DOS_GETCLUSTER ; Get the first block of the cluster -.394aa1 90 09 bcc $394aac BCC pass_failure ; If there's an error... pass it up the chain -.394aa3 ret_success -.394aa3 e2 20 sep #$20 SEP #$20 ; set A short -.394aa5 64 0e stz $032e STZ DOS_STATUS -.394aa7 28 plp PLP -.394aa8 2b pld PLD -.394aa9 ab plb PLB -.394aaa 38 sec SEC -.394aab 6b rtl RTL -.394aac 28 plp pass_failure PLP ; Otherwise: pass any error up the chain +.3949fa b0 03 bcs $3949ff BCS get_directory +.3949fc 82 56 00 brl $394a55 BRL ret_failure +.3949ff get_directory +.3949ff c2 20 rep #$20 REP #$20 ; set A long +.394a01 22 09 42 39 jsl $394209 JSL DOS_DIROPEN ; Get the directory +.394a05 b0 07 bcs $394a0e BCS scan_entries ; If success: start scanning the directory entries +.394a07 e2 20 sep #$20 SEP #$20 ; set A short +.394a09 a9 08 lda #$08 LDA #DOS_ERR_NODIR ; Otherwise: return a no directory error +.394a0b 82 47 00 brl $394a55 BRL ret_failure +.394a0e 22 88 42 39 jsl $394288 scan_entries JSL DOS_DIRFIRST ; Move the DIR pointer to the beginning of the sector +.394a12 scan_loop +.394a12 e2 20 sep #$20 SEP #$20 ; set A short +.394a14 a0 00 00 ldy #$0000 LDY #0 +.394a17 b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y ; Check the directory entry +.394a19 d0 05 bne $394a20 BNE chk_unused ; If there's an entry, check to see if it's unused +.394a1b a9 09 lda #$09 LDA #DOS_ERR_NOTFOUND ; If end-of-directory, we couldn't find a match +.394a1d 82 35 00 brl $394a55 BRL ret_failure +.394a20 c9 e5 cmp #$e5 chk_unused CMP #DOS_DIR_ENT_UNUSED ; If it's unused... +.394a22 f0 26 beq $394a4a BEQ next_entry ; Go to the next entry +.394a24 a0 0b 00 ldy #$000b LDY #DIRENTRY.ATTRIBUTE ; Check the entry's attributes +.394a27 b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y +.394a29 89 08 bit #$08 BIT #DOS_ATTR_VOLUME ; Is it a volume name? +.394a2b d0 1d bne $394a4a BNE next_entry ; Yes: skip it! +.394a2d 29 0f and #$0f AND #DOS_ATTR_LONGNAME +.394a2f c9 0f cmp #$0f CMP #DOS_ATTR_LONGNAME ; Is it a long name field? +.394a31 f0 17 beq $394a4a BEQ next_entry ; Yes: skip it! +.394a33 a2 00 00 ldx #$0000 LDX #0 +.394a36 a0 00 00 ldy #$0000 LDY #DIRENTRY.SHORTNAME +.394a39 b7 18 lda [$0338],y scan_cmp_loop LDA [DOS_DIR_PTR],Y ; Get the X'th character of the entry +.394a3b df 3a a0 38 cmp $38a03a,x CMP DOS_SHORT_NAME,X ; And compare to the X'th character of the name we want +.394a3f d0 09 bne $394a4a BNE next_entry ; If not equal: try the next entry +.394a41 c8 iny INY ; Advance to the next character +.394a42 e8 inx INX +.394a43 e0 0b 00 cpx #$000b CPX #11 ; Did we reach the end of the names? +.394a46 f0 16 beq $394a5e BEQ match ; Yes: we have a match! +.394a48 80 ef bra $394a39 BRA scan_cmp_loop ; No: keep checking +.394a4a 22 a3 42 39 jsl $3942a3 next_entry JSL DOS_DIRNEXT ; Try to get the next directory entry +.394a4e 90 05 bcc $394a55 BCC ret_failure ; If we're at the end of the directory, return a failure. +.394a50 82 bf ff brl $394a12 BRL scan_loop ; If found: keep scanning +.394a53 a9 08 lda #$08 bad_dir LDA #DOS_ERR_NODIR ; Otherwise: fail with a NODIR error (maybe something else is better) +.394a55 ret_failure +.394a55 e2 20 sep #$20 SEP #$20 ; set A short +.394a57 85 0e sta $032e STA DOS_STATUS +.394a59 28 plp PLP +.394a5a 2b pld PLD +.394a5b ab plb PLB +.394a5c 18 clc CLC +.394a5d 6b rtl RTL +.394a5e match +.394a5e c2 20 rep #$20 REP #$20 ; set A long +.394a60 a0 1a 00 ldy #$001a LDY #DIRENTRY.CLUSTER_L ; Copy the cluster number from the directory entry +.394a63 b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y +.394a65 85 10 sta $0330 STA DOS_CLUS_ID ; To DOS_CLUS_ID +.394a67 a0 14 00 ldy #$0014 LDY #DIRENTRY.CLUSTER_H +.394a6a b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y +.394a6c 85 12 sta $0332 STA DOS_CLUS_ID+2 +.394a6e ret_success +.394a6e e2 20 sep #$20 SEP #$20 ; set A short +.394a70 64 0e stz $032e STZ DOS_STATUS +.394a72 28 plp PLP +.394a73 2b pld PLD +.394a74 ab plb PLB +.394a75 38 sec SEC +.394a76 6b rtl RTL +.394a77 DOS_READFILE +.394a77 8b phb PHB +.394a78 0b phd PHD +.394a79 08 php PHP +.394a7a 48 pha PHA ; begin setdbr macro +.394a7b 08 php PHP +.394a7c e2 20 sep #$20 SEP #$20 ; set A short +.394a7e a9 00 lda #$00 LDA #0 +.394a80 48 pha PHA +.394a81 ab plb PLB +.394a82 28 plp PLP +.394a83 68 pla PLA ; end setdbr macro +.394a84 48 pha PHA ; begin setdp macro +.394a85 08 php PHP +.394a86 c2 20 rep #$20 REP #$20 ; set A long +.394a88 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394a8b 5b tcd TCD +.394a8c 28 plp PLP +.394a8d 68 pla PLA ; end setdp macro +.394a8e c2 30 rep #$30 REP #$30 ; set A&X long +.394a90 a5 1e lda $033e LDA DOS_BUFF_PTR+2 +.394a92 48 pha PHA +.394a93 a5 1c lda $033c LDA DOS_BUFF_PTR +.394a95 48 pha PHA +.394a96 22 d2 49 39 jsl $3949d2 JSL DOS_FINDFILE ; Attempt to find the file's directory entry +.394a9a 68 pla PLA +.394a9b 85 1c sta $033c STA DOS_BUFF_PTR +.394a9d 68 pla PLA +.394a9e 85 1e sta $033e STA DOS_BUFF_PTR+2 +.394aa0 90 0f bcc $394ab1 BCC pass_failure ; If found: try to load the cluster +.394aa2 22 ec 47 39 jsl $3947ec load_cluster JSL DOS_GETCLUSTER ; Get the first block of the cluster +.394aa6 90 09 bcc $394ab1 BCC pass_failure ; If there's an error... pass it up the chain +.394aa8 ret_success +.394aa8 e2 20 sep #$20 SEP #$20 ; set A short +.394aaa 64 0e stz $032e STZ DOS_STATUS +.394aac 28 plp PLP .394aad 2b pld PLD .394aae ab plb PLB -.394aaf 18 clc CLC +.394aaf 38 sec SEC .394ab0 6b rtl RTL -.394ab1 ENTRYFORCLUS12 -.394ab1 8b phb PHB -.394ab2 0b phd PHD -.394ab3 08 php PHP -.394ab4 48 pha PHA ; begin setdbr macro -.394ab5 08 php PHP -.394ab6 e2 20 sep #$20 SEP #$20 ; set A short -.394ab8 a9 00 lda #$00 LDA #0 -.394aba 48 pha PHA -.394abb ab plb PLB -.394abc 28 plp PLP -.394abd 68 pla PLA ; end setdbr macro -.394abe 48 pha PHA ; begin setdp macro -.394abf 08 php PHP -.394ac0 c2 20 rep #$20 REP #$20 ; set A long -.394ac2 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394ac5 5b tcd TCD -.394ac6 28 plp PLP -.394ac7 68 pla PLA ; end setdp macro -.394ac8 c2 30 rep #$30 REP #$30 ; set A&X long -.394aca a5 10 lda $0330 LDA DOS_CLUS_ID ; DOS_TEMP := DOS_CLUS_ID * 3 -.394acc 0a asl a ASL A -.394acd 85 28 sta $0348 STA DOS_TEMP -.394acf a5 12 lda $0332 LDA DOS_CLUS_ID+2 -.394ad1 2a rol a ROL A -.394ad2 85 2a sta $034a STA DOS_TEMP+2 -.394ad4 18 clc CLC -.394ad5 a5 10 lda $0330 LDA DOS_CLUS_ID -.394ad7 65 28 adc $0348 ADC DOS_TEMP -.394ad9 85 28 sta $0348 STA DOS_TEMP -.394adb a5 12 lda $0332 LDA DOS_CLUS_ID+2 -.394add 65 2a adc $034a ADC DOS_TEMP+2 -.394adf 85 2a sta $034a STA DOS_TEMP+2 -.394ae1 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := (DOS_CLUS_ID * 3) / 2 -.394ae3 66 28 ror $0348 ROR DOS_TEMP ; DOS_TEMP is now the offset to the cluster's entry in the FAT -.394ae5 a5 28 lda $0348 LDA DOS_TEMP ; X should be the offset within the FAT buffer -.394ae7 29 ff 03 and #$03ff AND #$003FF -.394aea aa tax TAX -.394aeb 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 -.394aed 66 28 ror $0348 ROR DOS_TEMP -.394aef 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 -.394af1 66 28 ror $0348 ROR DOS_TEMP -.394af3 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 -.394af5 66 28 ror $0348 ROR DOS_TEMP -.394af7 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 -.394af9 66 28 ror $0348 ROR DOS_TEMP -.394afb 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 -.394afd 66 28 ror $0348 ROR DOS_TEMP -.394aff 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 -.394b01 66 28 ror $0348 ROR DOS_TEMP -.394b03 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 -.394b05 66 28 ror $0348 ROR DOS_TEMP -.394b07 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 -.394b09 66 28 ror $0348 ROR DOS_TEMP -.394b0b 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 -.394b0d 66 28 ror $0348 ROR DOS_TEMP -.394b0f 18 clc CLC ; DOS_FAT_LBA should be the LBA of the first FAT sector we need -.394b10 af 14 a0 38 lda $38a014 LDA FAT_BEGIN_LBA -.394b14 65 28 adc $0348 ADC DOS_TEMP -.394b16 85 24 sta $0344 STA DOS_FAT_LBA -.394b18 af 16 a0 38 lda $38a016 LDA FAT_BEGIN_LBA+2 -.394b1c 65 2a adc $034a ADC DOS_TEMP+2 -.394b1e 85 26 sta $0346 STA DOS_FAT_LBA+2 -.394b20 28 plp PLP -.394b21 2b pld PLD -.394b22 ab plb PLB -.394b23 6b rtl RTL -.394b24 FATFORCLUSTER12 -.394b24 8b phb PHB -.394b25 0b phd PHD -.394b26 08 php PHP -.394b27 48 pha PHA ; begin setdbr macro -.394b28 08 php PHP -.394b29 e2 20 sep #$20 SEP #$20 ; set A short -.394b2b a9 00 lda #$00 LDA #0 -.394b2d 48 pha PHA -.394b2e ab plb PLB -.394b2f 28 plp PLP -.394b30 68 pla PLA ; end setdbr macro -.394b31 48 pha PHA ; begin setdp macro -.394b32 08 php PHP -.394b33 c2 20 rep #$20 REP #$20 ; set A long -.394b35 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394b38 5b tcd TCD -.394b39 28 plp PLP -.394b3a 68 pla PLA ; end setdp macro -.394b3b c2 30 rep #$30 REP #$30 ; set A&X long -.394b3d a2 00 00 ldx #$0000 LDX #0 -.394b40 a9 5a 5a lda #$5a5a LDA #$5A5A -.394b43 8f 00 a5 38 sta $38a500 clr_loop STA DOS_FAT_SECTORS -.394b47 e8 inx INX -.394b48 e8 inx INX -.394b49 e0 00 04 cpx #$0400 CPX #1024 -.394b4c d0 f5 bne $394b43 BNE clr_loop -.394b4e 22 b1 4a 39 jsl $394ab1 JSL ENTRYFORCLUS12 ; Calculate the LBA -.394b52 a5 24 lda $0344 LDA DOS_FAT_LBA ; Point to the desired sector in the FAT -.394b54 85 02 sta $0322 STA BIOS_LBA -.394b56 a5 26 lda $0346 LDA DOS_FAT_LBA+2 -.394b58 85 04 sta $0324 STA BIOS_LBA+2 -.394b5a a9 00 a5 lda #$a500 LDA #<>DOS_FAT_SECTORS ; Point to the first 512 bytes of the FAT buffer -.394b5d 85 06 sta $0326 STA BIOS_BUFF_PTR -.394b5f a9 38 00 lda #$0038 LDA #`DOS_FAT_SECTORS -.394b62 85 08 sta $0328 STA BIOS_BUFF_PTR+2 -.394b64 22 44 10 00 jsl $001044 JSL GETBLOCK ; Attempt to load the first FAT sector -.394b68 90 17 bcc $394b81 BCC error -.394b6a e6 02 inc $0322 INC BIOS_LBA ; Move to the next sector -.394b6c a9 00 a7 lda #$a700 LDA #<>DOS_FAT_SECTORS+512 ; And point to the second 512 bytes of teh FAT buffer -.394b6f 85 06 sta $0326 STA BIOS_BUFF_PTR -.394b71 a9 38 00 lda #$0038 LDA #`DOS_FAT_SECTORS -.394b74 85 08 sta $0328 STA BIOS_BUFF_PTR+2 -.394b76 22 44 10 00 jsl $001044 JSL GETBLOCK ; Attempt to load the first FAT sector -.394b7a 90 05 bcc $394b81 BCC error -.394b7c 28 plp PLP -.394b7d 2b pld PLD -.394b7e ab plb PLB -.394b7f 38 sec SEC -.394b80 6b rtl RTL -.394b81 error -.394b81 e2 20 sep #$20 SEP #$20 ; set A short -.394b83 a9 06 lda #$06 LDA #DOS_ERR_FAT -.394b85 85 0e sta $032e STA DOS_STATUS -.394b87 28 plp PLP -.394b88 2b pld PLD -.394b89 ab plb PLB -.394b8a 18 clc CLC -.394b8b 6b rtl RTL -.394b8c FATFORCLUSTER32 -.394b8c 8b phb PHB -.394b8d 0b phd PHD -.394b8e 48 pha PHA ; begin setdbr macro -.394b8f 08 php PHP -.394b90 e2 20 sep #$20 SEP #$20 ; set A short -.394b92 a9 00 lda #$00 LDA #0 -.394b94 48 pha PHA -.394b95 ab plb PLB -.394b96 28 plp PLP -.394b97 68 pla PLA ; end setdbr macro -.394b98 48 pha PHA ; begin setdp macro -.394b99 08 php PHP -.394b9a c2 20 rep #$20 REP #$20 ; set A long -.394b9c a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394b9f 5b tcd TCD -.394ba0 28 plp PLP -.394ba1 68 pla PLA ; end setdp macro -.394ba2 c2 30 rep #$30 REP #$30 ; set A&X long -.394ba4 a5 10 lda $0330 LDA DOS_CLUS_ID -.394ba6 85 24 sta $0344 STA DOS_FAT_LBA -.394ba8 a5 12 lda $0332 LDA DOS_CLUS_ID+2 -.394baa 85 26 sta $0346 STA DOS_FAT_LBA+2 -.394bac a2 07 00 ldx #$0007 LDX #7 -.394baf 46 26 lsr $0346 div_loop LSR DOS_FAT_LBA+2 -.394bb1 66 24 ror $0344 ROR DOS_FAT_LBA -.394bb3 ca dex DEX -.394bb4 d0 f9 bne $394baf BNE div_loop -.394bb6 18 clc CLC -.394bb7 a5 24 lda $0344 LDA DOS_FAT_LBA -.394bb9 6f 14 a0 38 adc $38a014 ADC FAT_BEGIN_LBA -.394bbd 85 24 sta $0344 STA DOS_FAT_LBA -.394bbf a5 26 lda $0346 LDA DOS_FAT_LBA+2 -.394bc1 6f 16 a0 38 adc $38a016 ADC FAT_BEGIN_LBA+2 -.394bc5 85 26 sta $0346 STA DOS_FAT_LBA+2 -.394bc7 a5 24 lda $0344 LDA DOS_FAT_LBA ; We want to load the FAT sector -.394bc9 85 02 sta $0322 STA BIOS_LBA -.394bcb a5 26 lda $0346 LDA DOS_FAT_LBA+2 -.394bcd 85 04 sta $0324 STA BIOS_LBA+2 -.394bcf a9 00 a5 lda #$a500 LDA #<>DOS_FAT_SECTORS ; We want to load the FAT sector in DOS_FAT_SECTORS -.394bd2 85 06 sta $0326 STA BIOS_BUFF_PTR -.394bd4 a9 38 00 lda #$0038 LDA #`DOS_FAT_SECTORS -.394bd7 85 08 sta $0328 STA BIOS_BUFF_PTR+2 -.394bd9 22 44 10 00 jsl $001044 JSL GETBLOCK ; Load the FAT entry -.394bdd b0 06 bcs $394be5 BCS find_entry -.394bdf e2 20 sep #$20 SEP #$20 ; set A short -.394be1 a9 06 lda #$06 LDA #DOS_ERR_FAT -.394be3 80 0e bra $394bf3 BRA ret_failure -.394be5 find_entry -.394be5 c2 20 rep #$20 REP #$20 ; set A long -.394be7 a5 10 lda $0330 LDA DOS_CLUS_ID -.394be9 0a asl a ASL A -.394bea 0a asl a ASL A ; * 4 -.394beb 29 ff 01 and #$01ff AND #$1FF ; DOS_CLUS_ID MOD 512 -.394bee aa tax TAX ; X should be the offset within the sector -.394bef 2b pld ret_success PLD -.394bf0 ab plb PLB -.394bf1 38 sec SEC ; return success -.394bf2 6b rtl RTL -.394bf3 2b pld ret_failure PLD -.394bf4 ab plb PLB -.394bf5 18 clc CLC ; Return failure -.394bf6 6b rtl RTL -.394bf7 NEXTCLUSTER -.394bf7 08 php PHP -.394bf8 e2 20 sep #$20 SEP #$20 ; set A short -.394bfa af 01 a0 38 lda $38a001 LDA @l FILE_SYSTEM ; Get the file system code -.394bfe c9 00 cmp #$00 CMP #PART_TYPE_FAT12 ; Is it FAT12? -.394c00 d0 08 bne $394c0a BNE fat32 ; No: assume it's FAT32 -.394c02 22 18 4c 39 jsl $394c18 fat12 JSL NEXTCLUSTER12 ; Lookup the next cluster from FAT12 -.394c06 90 0d bcc $394c15 BCC pass_failure ; If there was an error, pass it up the chain -.394c08 80 06 bra $394c10 BRA ret_success -.394c0a 22 80 4c 39 jsl $394c80 fat32 JSL NEXTCLUSTER32 ; Lookup the next cluster from FAT32 -.394c0e 90 05 bcc $394c15 BCC pass_failure ; If there was an error, pass it up the chain -.394c10 64 0e stz $032e ret_success STZ DOS_STATUS -.394c12 28 plp PLP -.394c13 38 sec SEC -.394c14 6b rtl RTL -.394c15 28 plp pass_failure PLP -.394c16 18 clc CLC -.394c17 6b rtl RTL -.394c18 NEXTCLUSTER12 -.394c18 8b phb PHB -.394c19 0b phd PHD -.394c1a 08 php PHP -.394c1b 48 pha PHA ; begin setdbr macro -.394c1c 08 php PHP -.394c1d e2 20 sep #$20 SEP #$20 ; set A short -.394c1f a9 00 lda #$00 LDA #0 -.394c21 48 pha PHA -.394c22 ab plb PLB -.394c23 28 plp PLP -.394c24 68 pla PLA ; end setdbr macro -.394c25 48 pha PHA ; begin setdp macro -.394c26 08 php PHP -.394c27 c2 20 rep #$20 REP #$20 ; set A long -.394c29 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394c2c 5b tcd TCD -.394c2d 28 plp PLP -.394c2e 68 pla PLA ; end setdp macro -.394c2f c2 30 rep #$30 REP #$30 ; set A&X long -.394c31 22 24 4b 39 jsl $394b24 JSL FATFORCLUSTER12 ; Attempt to load the FAT entries -.394c35 b0 03 bcs $394c3a BCS chk_clus_id -.394c37 82 41 00 brl $394c7b BRL pass_failure -.394c3a a5 10 lda $0330 chk_clus_id LDA DOS_CLUS_ID ; Check the cluster ID... -.394c3c 89 01 00 bit #$0001 BIT #1 ; Is it odd? -.394c3f d0 0d bne $394c4e BNE is_odd ; Yes: calculate the next cluster for odd -.394c41 is_even -.394c41 c2 20 rep #$20 REP #$20 ; set A long -.394c43 bf 00 a5 38 lda $38a500,x LDA DOS_FAT_SECTORS,X ; DOS_CLUS_ID := DOS_FAT_SECTORS[X] & $0FFF -.394c47 29 ff 0f and #$0fff AND #$0FFF -.394c4a 85 28 sta $0348 STA DOS_TEMP -.394c4c 80 0c bra $394c5a BRA check_id -.394c4e is_odd -.394c4e c2 20 rep #$20 REP #$20 ; set A long -.394c50 bf 00 a5 38 lda $38a500,x LDA DOS_FAT_SECTORS,X ; DOS_CLUS_ID := DOS_FAT_SECTORS[X] >> 4 -.394c54 4a lsr a LSR A -.394c55 4a lsr a LSR A -.394c56 4a lsr a LSR A -.394c57 4a lsr a LSR A -.394c58 85 28 sta $0348 STA DOS_TEMP -.394c5a check_id -.394c5a c2 20 rep #$20 REP #$20 ; set A long -.394c5c a5 28 lda $0348 LDA DOS_TEMP ; Check the new cluster ID we got -.394c5e 29 f0 0f and #$0ff0 AND #$0FF0 ; Is it in the range $0FF0 -- $0FFF? -.394c61 c9 f0 0f cmp #$0ff0 CMP #$0FF0 -.394c64 f0 0f beq $394c75 BEQ no_more ; Yes: return that we've reached the end of the chain -.394c66 a5 28 lda $0348 LDA DOS_TEMP ; Restore the "current" cluster ID -.394c68 85 10 sta $0330 STA DOS_CLUS_ID -.394c6a 64 12 stz $0332 STZ DOS_CLUS_ID+2 -.394c6c ret_success -.394c6c e2 20 sep #$20 SEP #$20 ; set A short -.394c6e 64 0e stz $032e STZ DOS_STATUS -.394c70 28 plp PLP -.394c71 2b pld PLD -.394c72 ab plb PLB -.394c73 38 sec SEC -.394c74 6b rtl RTL -.394c75 no_more -.394c75 e2 20 sep #$20 SEP #$20 ; set A short -.394c77 a9 0a lda #$0a LDA #DOS_ERR_NOCLUSTER -.394c79 85 0e sta $032e STA DOS_STATUS -.394c7b 28 plp pass_failure PLP -.394c7c 2b pld PLD -.394c7d ab plb PLB -.394c7e 18 clc CLC -.394c7f 6b rtl RTL -.394c80 NEXTCLUSTER32 -.394c80 8b phb PHB -.394c81 0b phd PHD -.394c82 08 php PHP -.394c83 48 pha PHA ; begin setdbr macro -.394c84 08 php PHP -.394c85 e2 20 sep #$20 SEP #$20 ; set A short -.394c87 a9 00 lda #$00 LDA #0 -.394c89 48 pha PHA -.394c8a ab plb PLB -.394c8b 28 plp PLP -.394c8c 68 pla PLA ; end setdbr macro -.394c8d 48 pha PHA ; begin setdp macro -.394c8e 08 php PHP -.394c8f c2 20 rep #$20 REP #$20 ; set A long -.394c91 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394c94 5b tcd TCD -.394c95 28 plp PLP -.394c96 68 pla PLA ; end setdp macro -.394c97 c2 30 rep #$30 REP #$30 ; set A&X long -.394c99 22 8c 4b 39 jsl $394b8c JSL FATFORCLUSTER32 ; Get the FAT entry for this cluster -.394c9d 90 53 bcc $394cf2 BCC ret_failure ; If it did not work, return the error -.394c9f e2 20 sep #$20 SEP #$20 ; set A short -.394ca1 bf 00 a5 38 lda $38a500,x LDA @l DOS_FAT_SECTORS,X ; Get the entry and copy it to DOS_TEMP -.394ca5 85 28 sta $0348 STA DOS_TEMP -.394ca7 bf 01 a5 38 lda $38a501,x LDA @l DOS_FAT_SECTORS+1,X -.394cab 85 29 sta $0349 STA DOS_TEMP+1 -.394cad bf 02 a5 38 lda $38a502,x LDA @l DOS_FAT_SECTORS+2,X -.394cb1 85 2a sta $034a STA DOS_TEMP+2 -.394cb3 bf 03 a5 38 lda $38a503,x LDA @l DOS_FAT_SECTORS+3,X -.394cb7 85 2b sta $034b STA DOS_TEMP+3 -.394cb9 a5 28 lda $0348 xxxx LDA DOS_TEMP ; Is DOS_TEMP = $FFFFFFFF? -.394cbb c9 ff cmp #$ff CMP #$FF -.394cbd d0 18 bne $394cd7 BNE found_next -.394cbf a5 29 lda $0349 LDA DOS_TEMP+1 -.394cc1 c9 ff cmp #$ff CMP #$FF -.394cc3 d0 12 bne $394cd7 BNE found_next -.394cc5 a5 2a lda $034a LDA DOS_TEMP+2 -.394cc7 c9 ff cmp #$ff CMP #$FF -.394cc9 d0 0c bne $394cd7 BNE found_next -.394ccb a5 2b lda $034b LDA DOS_TEMP+3 -.394ccd c9 0f cmp #$0f CMP #$0F -.394ccf d0 06 bne $394cd7 BNE found_next ; No: return this cluster as the next -.394cd1 e2 20 sep #$20 SEP #$20 ; set A short -.394cd3 a9 0a lda #$0a LDA #DOS_ERR_NOCLUSTER ; Yes: return that there are no more clusters -.394cd5 80 1b bra $394cf2 BRA ret_failure -.394cd7 found_next -.394cd7 e2 20 sep #$20 SEP #$20 ; set A short -.394cd9 a5 28 lda $0348 LDA DOS_TEMP ; No: return DOS_TEMP as the new DOS_CLUS_ID -.394cdb 85 10 sta $0330 STA DOS_CLUS_ID -.394cdd a5 29 lda $0349 LDA DOS_TEMP+1 -.394cdf 85 11 sta $0331 STA DOS_CLUS_ID+1 -.394ce1 a5 2a lda $034a LDA DOS_TEMP+2 -.394ce3 85 12 sta $0332 STA DOS_CLUS_ID+2 -.394ce5 a5 2b lda $034b LDA DOS_TEMP+3 -.394ce7 85 13 sta $0333 STA DOS_CLUS_ID+3 -.394ce9 ret_success -.394ce9 e2 20 sep #$20 SEP #$20 ; set A short -.394ceb 64 0e stz $032e STZ DOS_STATUS ; Record success -.394ced 28 plp PLP -.394cee 2b pld PLD -.394cef ab plb PLB -.394cf0 38 sec SEC -.394cf1 6b rtl RTL -.394cf2 ret_failure -.394cf2 e2 20 sep #$20 SEP #$20 ; set A short -.394cf4 85 0e sta $032e STA DOS_STATUS ; Record the error condition -.394cf6 28 plp PLP -.394cf7 2b pld PLD -.394cf8 ab plb PLB -.394cf9 18 clc CLC -.394cfa 6b rtl RTL -.394cfb DOS_READNEXT -.394cfb 08 php PHP -.394cfc c2 30 rep #$30 REP #$30 ; set A&X long -.394cfe 22 f7 4b 39 jsl $394bf7 JSL NEXTCLUSTER ; Attempt to find the next cluster in the FAT -.394d02 90 09 bcc $394d0d BCC pass_failure ; If nothing found: pass the failure up the chain -.394d04 22 ec 47 39 jsl $3947ec JSL DOS_GETCLUSTER ; Otherwise: attempt to read the cluster -.394d08 90 03 bcc $394d0d BCC pass_failure ; If nothing read: pass the failure up the chain -.394d0a 28 plp ret_success PLP -.394d0b 38 sec SEC -.394d0c 6b rtl RTL -.394d0d 28 plp pass_failure PLP -.394d0e 18 clc CLC -.394d0f 6b rtl RTL -.394d10 DOS_FREECLUS -.394d10 08 php PHP -.394d11 48 pha PHA ; begin setdp macro -.394d12 08 php PHP -.394d13 c2 20 rep #$20 REP #$20 ; set A long -.394d15 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394d18 5b tcd TCD -.394d19 28 plp PLP -.394d1a 68 pla PLA ; end setdp macro -.394d1b e2 20 sep #$20 SEP #$20 ; set A short -.394d1d af 01 a0 38 lda $38a001 LDA @l FILE_SYSTEM ; Get the file system code -.394d21 c9 00 cmp #$00 CMP #PART_TYPE_FAT12 ; Is it FAT12? -.394d23 d0 08 bne $394d2d BNE fat32 ; No: assume it's FAT32 -.394d25 22 a1 4d 39 jsl $394da1 fat12 JSL DOS_FREECLUS12 ; Find the next free cluster from FAT12 -.394d29 90 0d bcc $394d38 BCC pass_failure ; If there was an error, pass it up the chain -.394d2b 80 06 bra $394d33 BRA ret_success -.394d2d 22 79 4e 39 jsl $394e79 fat32 JSL DOS_FREECLUS32 ; Find the next free cluster from FAT32 -.394d31 90 05 bcc $394d38 BCC pass_failure ; If there was an error, pass it up the chain -.394d33 64 0e stz $032e ret_success STZ DOS_STATUS -.394d35 28 plp PLP -.394d36 38 sec SEC -.394d37 6b rtl RTL -.394d38 28 plp pass_failure PLP -.394d39 18 clc CLC -.394d3a 6b rtl RTL -.394d3b FDC_READ2FAT12 -.394d3b 8b phb PHB -.394d3c 0b phd PHD -.394d3d 08 php PHP -.394d3e 48 pha PHA ; begin setdbr macro -.394d3f 08 php PHP -.394d40 e2 20 sep #$20 SEP #$20 ; set A short -.394d42 a9 00 lda #$00 LDA #0 -.394d44 48 pha PHA -.394d45 ab plb PLB -.394d46 28 plp PLP -.394d47 68 pla PLA ; end setdbr macro -.394d48 48 pha PHA ; begin setdp macro -.394d49 08 php PHP -.394d4a c2 20 rep #$20 REP #$20 ; set A long -.394d4c a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394d4f 5b tcd TCD -.394d50 28 plp PLP -.394d51 68 pla PLA ; end setdp macro -.394d52 c2 30 rep #$30 REP #$30 ; set A&X long -.394d54 a9 00 a5 lda #$a500 LDA #<>DOS_FAT_SECTORS ; Set the location to store the sector -.394d57 85 06 sta $0326 STA BIOS_BUFF_PTR -.394d59 a9 38 00 lda #$0038 LDA #`DOS_FAT_SECTORS -.394d5c 85 08 sta $0328 STA BIOS_BUFF_PTR+2 -.394d5e a5 24 lda $0344 LDA DOS_FAT_LBA -.394d60 85 02 sta $0322 STA BIOS_LBA -.394d62 a5 26 lda $0346 LDA DOS_FAT_LBA+2 -.394d64 85 04 sta $0324 STA BIOS_LBA+2 -.394d66 22 44 10 00 jsl $001044 JSL GETBLOCK ; Read the first sector -.394d6a b0 07 bcs $394d73 BCS inc_sect2 ; If success: start getting the second sector -.394d6c e2 20 sep #$20 SEP #$20 ; set A short -.394d6e a9 06 lda #$06 LDA #DOS_ERR_FAT -.394d70 82 1c 00 brl $394d8f BRL ret_failure -.394d73 inc_sect2 -.394d73 c2 20 rep #$20 REP #$20 ; set A long -.394d75 e6 02 inc $0322 INC BIOS_LBA ; Move to the next sector -.394d77 d0 02 bne $394d7b BNE inc_buff_ptr -.394d79 e6 04 inc $0324 INC BIOS_LBA+2 -.394d7b a9 00 a7 lda #$a700 inc_buff_ptr LDA #<>(DOS_FAT_SECTORS+DOS_SECTOR_SIZE) -.394d7e 85 06 sta $0326 STA BIOS_BUFF_PTR -.394d80 a9 38 00 lda #$0038 LDA #`(DOS_FAT_SECTORS+DOS_SECTOR_SIZE) -.394d83 85 08 sta $0328 STA BIOS_BUFF_PTR+2 -.394d85 22 44 10 00 jsl $001044 JSL GETBLOCK ; Read the second sector -.394d89 b0 0d bcs $394d98 BCS ret_success ; If success, return success -.394d8b e2 20 sep #$20 SEP #$20 ; set A short -.394d8d a9 06 lda #$06 LDA #DOS_ERR_FAT -.394d8f ret_failure -.394d8f e2 20 sep #$20 SEP #$20 ; set A short -.394d91 85 00 sta $0320 STA BIOS_STATUS -.394d93 28 plp PLP -.394d94 2b pld PLD -.394d95 ab plb PLB -.394d96 18 clc CLC -.394d97 6b rtl RTL -.394d98 ret_success -.394d98 e2 20 sep #$20 SEP #$20 ; set A short -.394d9a 64 00 stz $0320 STZ BIOS_STATUS -.394d9c 28 plp PLP -.394d9d 2b pld PLD -.394d9e ab plb PLB -.394d9f 38 sec SEC -.394da0 6b rtl RTL -.394da1 DOS_FREECLUS12 -.394da1 da phx PHX -.394da2 8b phb PHB -.394da3 0b phd PHD -.394da4 08 php PHP -.394da5 48 pha PHA ; begin setdbr macro -.394da6 08 php PHP -.394da7 e2 20 sep #$20 SEP #$20 ; set A short -.394da9 a9 00 lda #$00 LDA #0 -.394dab 48 pha PHA -.394dac ab plb PLB -.394dad 28 plp PLP -.394dae 68 pla PLA ; end setdbr macro -.394daf 48 pha PHA ; begin setdp macro -.394db0 08 php PHP -.394db1 c2 20 rep #$20 REP #$20 ; set A long -.394db3 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394db6 5b tcd TCD -.394db7 28 plp PLP -.394db8 68 pla PLA ; end setdp macro -.394db9 c2 30 rep #$30 REP #$30 ; set A&X long -.394dbb a9 02 00 lda #$0002 LDA #2 ; Cluster ID is 2 to start with -.394dbe 85 10 sta $0330 STA DOS_CLUS_ID -.394dc0 a9 00 00 lda #$0000 LDA #0 -.394dc3 85 12 sta $0332 STA DOS_CLUS_ID+2 -.394dc5 22 b1 4a 39 jsl $394ab1 JSL ENTRYFORCLUS12 ; Calculate the LBA and buffer offset for the cluster -.394dc9 22 3b 4d 39 jsl $394d3b JSL FDC_READ2FAT12 ; Read the first two sectors of the FAT -.394dcd b0 07 bcs $394dd6 BCS start_of_fat ; If success, move X to the start of the FAT -.394dcf e2 20 sep #$20 SEP #$20 ; set A short -.394dd1 a9 06 lda #$06 LDA #DOS_ERR_FAT -.394dd3 82 99 00 brl $394e6f BRL ret_failure -.394dd6 start_of_fat -.394dd6 c2 30 rep #$30 REP #$30 ; set A&X long -.394dd8 a5 10 lda $0330 chk_cluster LDA DOS_CLUS_ID ; Check to see if cluster number is even or odd -.394dda 89 01 00 bit #$0001 BIT #1 -.394ddd d0 09 bne $394de8 BNE is_odd -.394ddf bf 00 a5 38 lda $38a500,x is_even LDA DOS_FAT_SECTORS,X ; Get the cluster status for an even numbered cluster -.394de3 29 ff 0f and #$0fff AND #$0FFF -.394de6 80 08 bra $394df0 BRA chk_available -.394de8 bf 00 a5 38 lda $38a500,x is_odd LDA DOS_FAT_SECTORS,X ; Get the cluster status for an odd numbered cluster -.394dec 4a lsr a LSR A -.394ded 4a lsr a LSR A -.394dee 4a lsr a LSR A -.394def 4a lsr a LSR A -.394df0 chk_available -.394df0 85 28 sta $0348 STA DOS_TEMP -.394df2 c9 00 00 cmp #$0000 CMP #0 ; Is it available? -.394df5 f0 03 beq $394dfa BEQ chk_found -.394df7 82 39 00 brl $394e33 BRL next_cluster ; No: advance to the next cluster -.394dfa 8a txa chk_found TXA -.394dfb 85 2a sta $034a STA DOS_TEMP+2 -.394dfd a5 10 lda $0330 LDA DOS_CLUS_ID ; Check to see if cluster number is even or odd -.394dff 89 01 00 bit #$0001 BIT #1 -.394e02 d0 0d bne $394e11 BNE is_odd2 -.394e04 is_even2 -.394e04 bf 00 a5 38 lda $38a500,x LDA DOS_FAT_SECTORS,X ; Reserve the cluster in the FAT, even offset case -.394e08 09 ff 0f ora #$0fff ORA #$0FFF -.394e0b 9f 00 a5 38 sta $38a500,x STA DOS_FAT_SECTORS,X -.394e0f 80 0b bra $394e1c BRA write_fat -.394e11 is_odd2 -.394e11 bf 00 a5 38 lda $38a500,x LDA DOS_FAT_SECTORS,X ; Reserve the cluster in the FAT, odd offset case -.394e15 09 f0 ff ora #$fff0 ORA #$FFF0 -.394e18 9f 00 a5 38 sta $38a500,x STA DOS_FAT_SECTORS,X -.394e1c 22 43 4f 39 jsl $394f43 write_fat JSL WRITEFAT12 ; Write the two FAT sectors back to disk -.394e20 b0 07 bcs $394e29 BCS ret_success ; If success: return success -.394e22 e2 20 sep #$20 SEP #$20 ; set A short -.394e24 a9 14 lda #$14 LDA #DOS_ERR_FATUPDATE ; Flag an error trying to write the FAT back -.394e26 82 46 00 brl $394e6f BRL ret_failure -.394e29 ret_success -.394e29 e2 20 sep #$20 SEP #$20 ; set A short -.394e2b 64 0e stz $032e STZ DOS_STATUS -.394e2d 28 plp PLP -.394e2e 2b pld PLD -.394e2f ab plb PLB -.394e30 fa plx PLX -.394e31 38 sec SEC -.394e32 6b rtl RTL -.394e33 next_cluster -.394e33 e6 10 inc $0330 INC DOS_CLUS_ID ; And advance the cluster ID -.394e35 d0 02 bne $394e39 BNE calc_entry -.394e37 e6 12 inc $0332 INC DOS_CLUS_ID+2 -.394e39 22 b1 4a 39 jsl $394ab1 calc_entry JSL ENTRYFORCLUS12 ; Calculate the LBA and offset into the buffer for the cluster -.394e3d e0 00 00 cpx #$0000 CPX #0 ; Did we wrap around? -.394e40 f0 03 beq $394e45 BEQ chk_end_of_fat -.394e42 82 93 ff brl $394dd8 BRL chk_cluster ; No: go back and check it too -.394e45 chk_end_of_fat -.394e45 a5 24 lda $0344 LDA DOS_FAT_LBA ; Are we at the end of the FAT? -.394e47 cf 18 a0 38 cmp $38a018 CMP FAT2_BEGIN_LBA ; NOTE: we use the start sector of the second FAT as our sentinel -.394e4b d0 0f bne $394e5c BNE next_2 -.394e4d a5 26 lda $0346 LDA DOS_FAT_LBA+2 -.394e4f cf 1a a0 38 cmp $38a01a CMP FAT2_BEGIN_LBA+2 -.394e53 d0 07 bne $394e5c BNE next_2 ; No: get the next to sectors -.394e55 e2 20 sep #$20 SEP #$20 ; set A short -.394e57 a9 12 lda #$12 LDA #DOS_ERR_MEDIAFULL ; Yes: return media full -.394e59 82 13 00 brl $394e6f BRL ret_failure -.394e5c next_2 -.394e5c 22 3b 4d 39 jsl $394d3b JSL FDC_READ2FAT12 ; Read the next two sectors of the FAT -.394e60 90 06 bcc $394e68 BCC fat_fail ; If failed: return error -.394e62 a2 00 00 ldx #$0000 LDX #0 ; If success: Start scanning at the beginning of the sectors -.394e65 82 70 ff brl $394dd8 BRL chk_cluster ; And start checking from there -.394e68 fat_fail -.394e68 e2 20 sep #$20 SEP #$20 ; set A short -.394e6a a9 06 lda #$06 LDA #DOS_ERR_FAT -.394e6c 82 00 00 brl $394e6f BRL ret_failure -.394e6f ret_failure -.394e6f e2 20 sep #$20 SEP #$20 ; set A short -.394e71 85 0e sta $032e STA DOS_STATUS -.394e73 28 plp PLP -.394e74 2b pld PLD -.394e75 ab plb PLB -.394e76 fa plx PLX -.394e77 18 clc CLC -.394e78 6b rtl RTL -.394e79 DOS_FREECLUS32 -.394e79 8b phb PHB -.394e7a 0b phd PHD -.394e7b 08 php PHP -.394e7c 48 pha PHA ; begin setdbr macro -.394e7d 08 php PHP -.394e7e e2 20 sep #$20 SEP #$20 ; set A short -.394e80 a9 00 lda #$00 LDA #0 -.394e82 48 pha PHA -.394e83 ab plb PLB -.394e84 28 plp PLP -.394e85 68 pla PLA ; end setdbr macro -.394e86 48 pha PHA ; begin setdp macro -.394e87 08 php PHP -.394e88 c2 20 rep #$20 REP #$20 ; set A long -.394e8a a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394e8d 5b tcd TCD -.394e8e 28 plp PLP -.394e8f 68 pla PLA ; end setdp macro -.394e90 c2 30 rep #$30 REP #$30 ; set A&X long -.394e92 a9 00 a3 lda #$a300 LDA #<>DOS_SECTOR ; Set the location to store the sector -.394e95 85 06 sta $0326 STA BIOS_BUFF_PTR -.394e97 a9 38 00 lda #$0038 LDA #`DOS_SECTOR -.394e9a 85 08 sta $0328 STA BIOS_BUFF_PTR+2 -.394e9c af 14 a0 38 lda $38a014 LDA FAT_BEGIN_LBA ; Set the LBA to that of the first FAT sector -.394ea0 85 02 sta $0322 STA BIOS_LBA -.394ea2 af 16 a0 38 lda $38a016 LDA FAT_BEGIN_LBA+2 -.394ea6 85 04 sta $0324 STA BIOS_LBA+2 -.394ea8 22 44 10 00 jsl $001044 JSL GETBLOCK ; Load the sector into memory -.394eac b0 07 bcs $394eb5 BCS initial_entry ; If OK: set the initial entry to check -.394eae e2 20 sep #$20 SEP #$20 ; set A short -.394eb0 a9 06 lda #$06 LDA #DOS_ERR_FAT ; Return a NOFAT error -.394eb2 82 6b 00 brl $394f20 BRL ret_failure -.394eb5 initial_entry -.394eb5 c2 20 rep #$20 REP #$20 ; set A long -.394eb7 a9 02 00 lda #$0002 LDA #2 ; Set DOS_CLUS_ID to 2 -.394eba 85 10 sta $0330 STA DOS_CLUS_ID -.394ebc a9 00 00 lda #$0000 LDA #0 -.394ebf 85 12 sta $0332 STA DOS_CLUS_ID+2 -.394ec1 a2 08 00 ldx #$0008 LDX #8 ; Set the offset to DOS_CLUS_ID * 4 -.394ec4 bf 00 a3 38 lda $38a300,x chk_entry LDA DOS_SECTOR,X ; Is the cluster entry == $00000000? -.394ec8 d0 06 bne $394ed0 BNE next_entry ; No: move to the next entry -.394eca bf 02 a3 38 lda $38a302,x LDA DOS_SECTOR+2,X -.394ece f0 36 beq $394f06 BEQ found_free ; Yes: go to allocate and return it -.394ed0 e6 10 inc $0330 next_entry INC DOS_CLUS_ID ; Move to the next cluster -.394ed2 d0 02 bne $394ed6 BNE inc_ptr -.394ed4 e6 12 inc $0332 INC DOS_CLUS_ID+2 -.394ed6 e8 inx inc_ptr INX ; Update the index to the entry -.394ed7 e8 inx INX -.394ed8 e8 inx INX -.394ed9 e8 inx INX -.394eda e0 00 02 cpx #$0200 CPX #DOS_SECTOR_SIZE ; Are we outside the sector? -.394edd 90 e5 bcc $394ec4 BLT chk_entry ; No: check this entry -.394edf e6 02 inc $0322 INC BIOS_LBA ; Point to the next sector in the FAT -.394ee1 d0 18 bne $394efb BNE get_block -.394ee3 e6 04 inc $0324 INC BIOS_LBA+2 -.394ee5 a5 04 lda $0324 LDA BIOS_LBA+2 -.394ee7 cf 1a a0 38 cmp $38a01a CMP FAT2_BEGIN_LBA+2 -.394eeb 90 0e bcc $394efb BLT get_block -.394eed a5 02 lda $0322 LDA BIOS_LBA -.394eef cf 18 a0 38 cmp $38a018 CMP FAT2_BEGIN_LBA -.394ef3 90 06 bcc $394efb BLT get_block -.394ef5 e2 20 sep #$20 SEP #$20 ; set A short -.394ef7 a9 12 lda #$12 LDA #DOS_ERR_MEDIAFULL ; No: throw a media full error -.394ef9 80 25 bra $394f20 BRA ret_failure -.394efb 22 44 10 00 jsl $001044 get_block JSL GETBLOCK ; Attempt to read the block -.394eff 90 1b bcc $394f1c BCC ret_fat_error ; If error: throw a FAT error -.394f01 a2 00 00 ldx #$0000 set_ptr LDX #0 ; Set index pointer to the first entry -.394f04 80 be bra $394ec4 BRA chk_entry ; Check this entry -.394f06 found_free -.394f06 c2 20 rep #$20 REP #$20 ; set A long -.394f08 a9 ff ff lda #$ffff LDA #<>FAT_LAST_CLUSTER ; Set the entry to $0FFFFFFF to make it the last entry in its chain -.394f0b 9f 00 a3 38 sta $38a300,x STA DOS_SECTOR,X -.394f0f a9 ff 0f lda #$0fff LDA #(FAT_LAST_CLUSTER >> 16) -.394f12 9f 02 a3 38 sta $38a302,x STA DOS_SECTOR+2,X -.394f16 22 24 10 00 jsl $001024 JSL PUTBLOCK ; Write the sector back to the block device -.394f1a b0 0d bcs $394f29 BCS ret_success ; If OK: return success -.394f1c ret_fat_error -.394f1c e2 20 sep #$20 SEP #$20 ; set A short -.394f1e a9 06 lda #$06 LDA #DOS_ERR_FAT ; Otherwise: return NOFAT error -.394f20 ret_failure -.394f20 e2 20 sep #$20 SEP #$20 ; set A short -.394f22 85 0e sta $032e STA DOS_STATUS -.394f24 28 plp PLP -.394f25 2b pld PLD -.394f26 ab plb PLB -.394f27 18 clc CLC -.394f28 6b rtl RTL -.394f29 ret_success -.394f29 e2 20 sep #$20 SEP #$20 ; set A short -.394f2b 64 0e stz $032e STZ DOS_STATUS -.394f2d 28 plp PLP -.394f2e 2b pld PLD -.394f2f ab plb PLB -.394f30 38 sec SEC -.394f31 6b rtl RTL -.394f32 DELCLUSTER -.394f32 e2 20 sep #$20 SEP #$20 ; set A short -.394f34 af 01 a0 38 lda $38a001 LDA @l FILE_SYSTEM ; Get the file system code -.394f38 c9 00 cmp #$00 CMP #PART_TYPE_FAT12 ; Is it FAT12? -.394f3a d0 04 bne $394f40 BNE fat32 ; No: assume it's FAT32 -.394f3c 5c 8a 4f 39 jmp $394f8a fat12 JML DELCLUSTER12 -.394f40 4c d8 4f jmp $394fd8 fat32 JMP DELCLUSTER32 -.394f43 WRITEFAT12 -.394f43 8b phb PHB -.394f44 0b phd PHD -.394f45 48 pha PHA ; begin setdbr macro -.394f46 08 php PHP -.394f47 e2 20 sep #$20 SEP #$20 ; set A short -.394f49 a9 00 lda #$00 LDA #0 -.394f4b 48 pha PHA -.394f4c ab plb PLB -.394f4d 28 plp PLP -.394f4e 68 pla PLA ; end setdbr macro -.394f4f 48 pha PHA ; begin setdp macro -.394f50 08 php PHP -.394f51 c2 20 rep #$20 REP #$20 ; set A long -.394f53 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394f56 5b tcd TCD -.394f57 28 plp PLP -.394f58 68 pla PLA ; end setdp macro -.394f59 c2 30 rep #$30 REP #$30 ; set A&X long -.394f5b a9 00 a5 lda #$a500 LDA #<>DOS_FAT_SECTORS ; Point to the first FAT sector in memory -.394f5e 85 06 sta $0326 STA BIOS_BUFF_PTR -.394f60 a9 38 00 lda #$0038 LDA #`DOS_FAT_SECTORS -.394f63 85 08 sta $0328 STA BIOS_BUFF_PTR+2 -.394f65 a5 24 lda $0344 LDA DOS_FAT_LBA ; Set the LBA to that of the first sector's -.394f67 85 02 sta $0322 STA BIOS_LBA -.394f69 a5 26 lda $0346 LDA DOS_FAT_LBA+2 -.394f6b 85 04 sta $0324 STA BIOS_LBA+2 -.394f6d 22 24 10 00 jsl $001024 JSL PUTBLOCK ; Write the first sector back to the block device -.394f71 90 14 bcc $394f87 BCC done -.394f73 a9 00 a7 lda #$a700 LDA #<>(DOS_FAT_SECTORS+DOS_SECTOR_SIZE) -.394f76 85 06 sta $0326 STA BIOS_BUFF_PTR -.394f78 a9 38 00 lda #$0038 LDA #`(DOS_FAT_SECTORS+DOS_SECTOR_SIZE) -.394f7b 85 08 sta $0328 STA BIOS_BUFF_PTR+2 -.394f7d e6 02 inc $0322 INC BIOS_LBA ; Point to the next sector in the FAT -.394f7f d0 02 bne $394f83 BNE put_second -.394f81 e6 04 inc $0324 INC BIOS_LBA+2 -.394f83 22 24 10 00 jsl $001024 put_second JSL PUTBLOCK ; Write the second sector back to the block device -.394f87 2b pld done PLD -.394f88 ab plb PLB -.394f89 6b rtl RTL -.394f8a DELCLUSTER12 -.394f8a 8b phb PHB -.394f8b 0b phd PHD -.394f8c 08 php PHP -.394f8d 48 pha PHA ; begin setdbr macro -.394f8e 08 php PHP -.394f8f e2 20 sep #$20 SEP #$20 ; set A short -.394f91 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.394f93 48 pha PHA -.394f94 ab plb PLB -.394f95 28 plp PLP -.394f96 68 pla PLA ; end setdbr macro -.394f97 48 pha PHA ; begin setdp macro -.394f98 08 php PHP -.394f99 c2 20 rep #$20 REP #$20 ; set A long -.394f9b a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394f9e 5b tcd TCD -.394f9f 28 plp PLP -.394fa0 68 pla PLA ; end setdp macro -.394fa1 c2 30 rep #$30 REP #$30 ; set A&X long -.394fa3 22 24 4b 39 jsl $394b24 JSL FATFORCLUSTER12 -.394fa7 8a txa TXA ; Check to see if the index is odd or even -.394fa8 89 01 00 bit #$0001 BIT #1 -.394fab d0 08 bne $394fb5 BNE is_odd -.394fad bd 00 a5 lda $38a500,x is_even LDA DOS_FAT_SECTORS,X ; Get the two bytes from the FAT -.394fb0 29 00 f0 and #$f000 AND #$F000 ; Mask out the lower 12 bits -.394fb3 80 06 bra $394fbb BRA save_update -.394fb5 bd 00 a5 lda $38a500,x is_odd LDA DOS_FAT_SECTORS,X ; Get the two bytes from the FAT -.394fb8 29 0f 00 and #$000f AND #$000F ; Mask out the upper 12 bits -.394fbb 9d 00 a5 sta $38a500,x save_update STA DOS_FAT_SECTORS,X ; And write it back -.394fbe 22 43 4f 39 jsl $394f43 JSL WRITEFAT12 ; Write the two FAT12 sectors back to the drive -.394fc2 b0 0b bcs $394fcf BCS ret_success -.394fc4 ret_failure -.394fc4 e2 20 sep #$20 SEP #$20 ; set A short -.394fc6 a9 06 lda #$06 LDA #DOS_ERR_FAT -.394fc8 85 0e sta $032e STA DOS_STATUS -.394fca 28 plp PLP -.394fcb 2b pld PLD -.394fcc ab plb PLB -.394fcd 18 clc CLC -.394fce 6b rtl RTL -.394fcf ret_success -.394fcf e2 20 sep #$20 SEP #$20 ; set A short -.394fd1 64 0e stz $032e STZ DOS_STATUS -.394fd3 28 plp PLP -.394fd4 2b pld PLD -.394fd5 ab plb PLB -.394fd6 38 sec SEC -.394fd7 6b rtl RTL -.394fd8 DELCLUSTER32 -.394fd8 8b phb PHB -.394fd9 0b phd PHD -.394fda 08 php PHP -.394fdb c2 30 rep #$30 REP #$30 ; set A&X long -.394fdd 48 pha PHA ; begin setdbr macro -.394fde 08 php PHP -.394fdf e2 20 sep #$20 SEP #$20 ; set A short -.394fe1 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.394fe3 48 pha PHA -.394fe4 ab plb PLB -.394fe5 28 plp PLP -.394fe6 68 pla PLA ; end setdbr macro -.394fe7 48 pha PHA ; begin setdp macro -.394fe8 08 php PHP -.394fe9 c2 20 rep #$20 REP #$20 ; set A long -.394feb a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.394fee 5b tcd TCD -.394fef 28 plp PLP -.394ff0 68 pla PLA ; end setdp macro -.394ff1 22 8c 4b 39 jsl $394b8c JSL FATFORCLUSTER32 -.394ff5 a9 00 00 lda #$0000 LDA #0 -.394ff8 9d 00 a5 sta $38a500,x STA DOS_FAT_SECTORS,X ; Set the cluster entry to 0 -.394ffb 9d 02 a5 sta $38a502,x STA DOS_FAT_SECTORS+2,X -.394ffe 22 24 10 00 jsl $001024 JSL PUTBLOCK ; Write the sector back to the block device -.395002 b0 0b bcs $39500f BCS ret_success -.395004 ret_failure -.395004 e2 20 sep #$20 SEP #$20 ; set A short -.395006 a9 06 lda #$06 LDA #DOS_ERR_FAT -.395008 85 0e sta $032e STA DOS_STATUS -.39500a 28 plp PLP -.39500b 2b pld PLD -.39500c ab plb PLB -.39500d 18 clc CLC -.39500e 6b rtl RTL -.39500f ret_success -.39500f e2 20 sep #$20 SEP #$20 ; set A short -.395011 64 0e stz $032e STZ DOS_STATUS -.395013 28 plp PLP -.395014 2b pld PLD -.395015 ab plb PLB -.395016 38 sec SEC -.395017 6b rtl RTL -.395018 DOS_APPENDCLUS -.395018 8b phb PHB -.395019 0b phd PHD -.39501a 08 php PHP -.39501b 48 pha PHA ; begin setdbr macro -.39501c 08 php PHP -.39501d e2 20 sep #$20 SEP #$20 ; set A short -.39501f a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.395021 48 pha PHA -.395022 ab plb PLB -.395023 28 plp PLP -.395024 68 pla PLA ; end setdbr macro -.395025 48 pha PHA ; begin setdp macro -.395026 08 php PHP -.395027 c2 20 rep #$20 REP #$20 ; set A long -.395029 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.39502c 5b tcd TCD -.39502d 28 plp PLP -.39502e 68 pla PLA ; end setdp macro -.39502f c2 30 rep #$30 REP #$30 ; set A&X long -.395031 a5 12 lda $0332 LDA DOS_CLUS_ID+2 ; Save the cluster number for later -.395033 48 pha PHA -.395034 a5 10 lda $0330 LDA DOS_CLUS_ID -.395036 48 pha PHA -.395037 22 10 4d 39 jsl $394d10 JSL DOS_FREECLUS ; Find a free cluster on the block device -.39503b b0 09 bcs $395046 BCS save_cluster ; If we got a cluster, write the data to it -.39503d 68 pla fail_cleanup PLA ; Restore the cluster of the file -.39503e 85 10 sta $0330 STA DOS_CLUS_ID -.395040 68 pla PLA -.395041 85 12 sta $0332 STA DOS_CLUS_ID+2 -.395043 82 7d 00 brl $3950c3 BRL pass_failure ; Pass the failure back up the chain -.395046 a5 10 lda $0330 save_cluster LDA DOS_CLUS_ID -.395048 8d 36 a0 sta $38a036 STA DOS_NEW_CLUSTER -.39504b a5 12 lda $0332 LDA DOS_CLUS_ID+2 -.39504d 8d 38 a0 sta $38a038 STA DOS_NEW_CLUSTER+2 -.395050 22 29 48 39 jsl $394829 JSL DOS_PUTCLUSTER ; Write the data to the free cluster -.395054 90 e7 bcc $39503d BCC fail_cleanup ; If failure: clean up stack and pass the failure up -.395056 68 pla PLA ; Restore the cluster of the file -.395057 85 10 sta $0330 STA DOS_CLUS_ID -.395059 68 pla PLA -.39505a 85 12 sta $0332 STA DOS_CLUS_ID+2 -.39505c 22 f7 4b 39 jsl $394bf7 walk_loop JSL NEXTCLUSTER ; Try to get the next cluster in the chain -.395060 b0 fa bcs $39505c BCS walk_loop ; If found a cluster, keep walking the chain -.395062 e2 20 sep #$20 SEP #$20 ; set A short -.395064 af 01 a0 38 lda $38a001 LDA @l FILE_SYSTEM ; Get the file system code -.395068 c9 00 cmp #$00 CMP #PART_TYPE_FAT12 ; Is it FAT12? -.39506a d0 3d bne $3950a9 BNE fat32 ; No: assume it's FAT32 -.39506c fat12 -.39506c c2 20 rep #$20 REP #$20 ; set A long -.39506e 22 b1 4a 39 jsl $394ab1 JSL ENTRYFORCLUS12 ; Make sure we have the right offset for the cluster -.395072 a5 10 lda $0330 LDA DOS_CLUS_ID ; Check to see if the last cluster ID is even or odd -.395074 89 01 00 bit #$0001 BIT #1 -.395077 d0 11 bne $39508a BNE is_odd -.395079 ad 36 a0 lda $38a036 is_even LDA DOS_NEW_CLUSTER ; Handle the even case (change the lower 12 bits) -.39507c 29 ff 0f and #$0fff AND #$0FFF -.39507f 8d 36 a0 sta $38a036 STA DOS_NEW_CLUSTER -.395082 bd 00 a5 lda $38a500,x LDA DOS_FAT_SECTORS,X -.395085 29 00 f0 and #$f000 AND #$F000 -.395088 80 10 bra $39509a BRA update_fat12 -.39508a ad 36 a0 lda $38a036 is_odd LDA DOS_NEW_CLUSTER ; Handle the odd case (change the upper 12 bits) -.39508d 0a asl a ASL A -.39508e 0a asl a ASL A -.39508f 0a asl a ASL A -.395090 0a asl a ASL A -.395091 8d 36 a0 sta $38a036 STA DOS_NEW_CLUSTER -.395094 bd 00 a5 lda $38a500,x LDA DOS_FAT_SECTORS,X -.395097 29 0f 00 and #$000f AND #$000F -.39509a 0d 36 a0 ora $38a036 update_fat12 ORA DOS_NEW_CLUSTER -.39509d 9d 00 a5 sta $38a500,x STA DOS_FAT_SECTORS,X -.3950a0 22 43 4f 39 jsl $394f43 JSL WRITEFAT12 ; Write the two FAT12 sectors back to the drive -.3950a4 b0 22 bcs $3950c8 BCS ret_success -.3950a6 82 1a 00 brl $3950c3 BRL pass_failure -.3950a9 fat32 -.3950a9 c2 20 rep #$20 REP #$20 ; set A long -.3950ab ad 36 a0 lda $38a036 LDA DOS_NEW_CLUSTER ; Write the ID of the new cluster to the end of the chain -.3950ae 9d 00 a5 sta $38a500,x STA DOS_FAT_SECTORS,X -.3950b1 ad 38 a0 lda $38a038 LDA DOS_NEW_CLUSTER+2 -.3950b4 9d 02 a5 sta $38a502,x STA DOS_FAT_SECTORS+2,X -.3950b7 22 24 10 00 jsl $001024 JSL PUTBLOCK ; Write the FAT sector back (assumes BIOS_LBA and BIOS_BUFF_PTR haven't changed) -.3950bb b0 0b bcs $3950c8 BCS ret_success -.3950bd e2 20 sep #$20 SEP #$20 ; set A short -.3950bf a9 06 lda #$06 LDA #DOS_ERR_FAT ; Problem working with the FAT -.3950c1 85 0e sta $032e STA DOS_STATUS -.3950c3 28 plp pass_failure PLP -.3950c4 2b pld PLD -.3950c5 ab plb PLB -.3950c6 18 clc CLC -.3950c7 6b rtl RTL -.3950c8 ret_success -.3950c8 e2 20 sep #$20 SEP #$20 ; set A short -.3950ca 64 0e stz $032e STZ DOS_STATUS -.3950cc 28 plp PLP -.3950cd 2b pld PLD -.3950ce ab plb PLB -.3950cf 38 sec SEC -.3950d0 6b rtl RTL -.3950d1 BCD2BIN -.3950d1 8b phb PHB -.3950d2 0b phd PHD -.3950d3 08 php PHP -.3950d4 48 pha PHA ; begin setdbr macro -.3950d5 08 php PHP -.3950d6 e2 20 sep #$20 SEP #$20 ; set A short -.3950d8 a9 00 lda #$00 LDA #0 -.3950da 48 pha PHA -.3950db ab plb PLB -.3950dc 28 plp PLP -.3950dd 68 pla PLA ; end setdbr macro -.3950de 48 pha PHA ; begin setdp macro -.3950df 08 php PHP -.3950e0 c2 20 rep #$20 REP #$20 ; set A long -.3950e2 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.3950e5 5b tcd TCD -.3950e6 28 plp PLP -.3950e7 68 pla PLA ; end setdp macro -.3950e8 c2 30 rep #$30 REP #$30 ; set A&X long -.3950ea 85 28 sta $0348 STA DOS_TEMP -.3950ec 29 0f 00 and #$000f AND #$000F -.3950ef 85 2a sta $034a STA DOS_TEMP+2 -.3950f1 a5 28 lda $0348 LDA DOS_TEMP -.3950f3 4a lsr a LSR A -.3950f4 4a lsr a LSR A -.3950f5 4a lsr a LSR A -.3950f6 4a lsr a LSR A -.3950f7 85 28 sta $0348 STA DOS_TEMP -.3950f9 29 0f 00 and #$000f AND #$000F -.3950fc 8f 00 01 00 sta $000100 STA @l UNSIGNED_MULT_A_LO -.395100 a9 0a 00 lda #$000a LDA #10 -.395103 8f 02 01 00 sta $000102 STA @l UNSIGNED_MULT_B_LO -.395107 af 04 01 00 lda $000104 LDA @l UNSIGNED_MULT_AL_LO -.39510b 18 clc CLC -.39510c 65 2a adc $034a ADC DOS_TEMP+2 -.39510e 85 2a sta $034a STA DOS_TEMP+2 -.395110 a5 28 lda $0348 LDA DOS_TEMP -.395112 4a lsr a LSR A -.395113 4a lsr a LSR A -.395114 4a lsr a LSR A -.395115 4a lsr a LSR A -.395116 85 28 sta $0348 STA DOS_TEMP -.395118 29 0f 00 and #$000f AND #$000F -.39511b 8f 00 01 00 sta $000100 STA @l UNSIGNED_MULT_A_LO -.39511f a9 64 00 lda #$0064 LDA #100 -.395122 8f 02 01 00 sta $000102 STA @l UNSIGNED_MULT_B_LO -.395126 af 04 01 00 lda $000104 LDA @l UNSIGNED_MULT_AL_LO -.39512a 18 clc CLC -.39512b 65 2a adc $034a ADC DOS_TEMP+2 -.39512d 85 2a sta $034a STA DOS_TEMP+2 -.39512f a5 28 lda $0348 LDA DOS_TEMP -.395131 4a lsr a LSR A -.395132 4a lsr a LSR A -.395133 4a lsr a LSR A -.395134 4a lsr a LSR A -.395135 29 0f 00 and #$000f AND #$000F -.395138 8f 00 01 00 sta $000100 STA @l UNSIGNED_MULT_A_LO -.39513c a9 e8 03 lda #$03e8 LDA #1000 -.39513f 8f 02 01 00 sta $000102 STA @l UNSIGNED_MULT_B_LO -.395143 af 04 01 00 lda $000104 LDA @l UNSIGNED_MULT_AL_LO -.395147 18 clc CLC -.395148 65 2a adc $034a ADC DOS_TEMP+2 -.39514a 28 plp PLP -.39514b 2b pld PLD -.39514c ab plb PLB -.39514d 6b rtl RTL -.39514e DOS_RTCCREATE -.39514e 8b phb PHB -.39514f 0b phd PHD -.395150 08 php PHP -.395151 48 pha PHA ; begin setdbr macro -.395152 08 php PHP -.395153 e2 20 sep #$20 SEP #$20 ; set A short -.395155 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.395157 48 pha PHA -.395158 ab plb PLB -.395159 28 plp PLP -.39515a 68 pla PLA ; end setdbr macro -.39515b 48 pha PHA ; begin setdp macro -.39515c 08 php PHP -.39515d c2 20 rep #$20 REP #$20 ; set A long -.39515f a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395162 5b tcd TCD -.395163 28 plp PLP -.395164 68 pla PLA ; end setdp macro -.395165 c2 10 rep #$10 REP #$10 ; set X long -.395167 e2 20 sep #$20 SEP #$20 ; set A short -.395169 af 0e 08 af lda $af080e LDA @l RTC_CTRL ; Turn off the updates to the clock -.39516d 09 08 ora #$08 ORA #%00001000 -.39516f 8f 0e 08 af sta $af080e STA @l RTC_CTRL -.395173 af 0f 08 af lda $af080f LDA @l RTC_CENTURY -.395177 85 29 sta $0349 STA DOS_TEMP+1 -.395179 af 0a 08 af lda $af080a LDA @l RTC_YEAR ; Get the year -.39517d 85 28 sta $0348 STA DOS_TEMP -.39517f c2 20 rep #$20 REP #$20 ; set A long -.395181 a5 28 lda $0348 LDA DOS_TEMP -.395183 22 d1 50 39 jsl $3950d1 JSL BCD2BIN ; Convert it to binary -.395187 85 28 sta $0348 STA DOS_TEMP -.395189 38 sec SEC ; Year is relative to 1980 -.39518a e9 bc 07 sbc #$07bc SBC #1980 -.39518d c2 20 rep #$20 REP #$20 ; set A long -.39518f 0a asl a ASL A -.395190 0a asl a ASL A -.395191 0a asl a ASL A -.395192 0a asl a ASL A -.395193 0a asl a ASL A +.394ab1 28 plp pass_failure PLP ; Otherwise: pass any error up the chain +.394ab2 2b pld PLD +.394ab3 ab plb PLB +.394ab4 18 clc CLC +.394ab5 6b rtl RTL +.394ab6 ENTRYFORCLUS12 +.394ab6 8b phb PHB +.394ab7 0b phd PHD +.394ab8 08 php PHP +.394ab9 48 pha PHA ; begin setdbr macro +.394aba 08 php PHP +.394abb e2 20 sep #$20 SEP #$20 ; set A short +.394abd a9 00 lda #$00 LDA #0 +.394abf 48 pha PHA +.394ac0 ab plb PLB +.394ac1 28 plp PLP +.394ac2 68 pla PLA ; end setdbr macro +.394ac3 48 pha PHA ; begin setdp macro +.394ac4 08 php PHP +.394ac5 c2 20 rep #$20 REP #$20 ; set A long +.394ac7 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394aca 5b tcd TCD +.394acb 28 plp PLP +.394acc 68 pla PLA ; end setdp macro +.394acd c2 30 rep #$30 REP #$30 ; set A&X long +.394acf a5 10 lda $0330 LDA DOS_CLUS_ID ; DOS_TEMP := DOS_CLUS_ID * 3 +.394ad1 0a asl a ASL A +.394ad2 85 28 sta $0348 STA DOS_TEMP +.394ad4 a5 12 lda $0332 LDA DOS_CLUS_ID+2 +.394ad6 2a rol a ROL A +.394ad7 85 2a sta $034a STA DOS_TEMP+2 +.394ad9 18 clc CLC +.394ada a5 10 lda $0330 LDA DOS_CLUS_ID +.394adc 65 28 adc $0348 ADC DOS_TEMP +.394ade 85 28 sta $0348 STA DOS_TEMP +.394ae0 a5 12 lda $0332 LDA DOS_CLUS_ID+2 +.394ae2 65 2a adc $034a ADC DOS_TEMP+2 +.394ae4 85 2a sta $034a STA DOS_TEMP+2 +.394ae6 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := (DOS_CLUS_ID * 3) / 2 +.394ae8 66 28 ror $0348 ROR DOS_TEMP ; DOS_TEMP is now the offset to the cluster's entry in the FAT +.394aea a5 28 lda $0348 LDA DOS_TEMP ; X should be the offset within the FAT buffer +.394aec 29 ff 03 and #$03ff AND #$003FF +.394aef aa tax TAX +.394af0 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 +.394af2 66 28 ror $0348 ROR DOS_TEMP +.394af4 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 +.394af6 66 28 ror $0348 ROR DOS_TEMP +.394af8 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 +.394afa 66 28 ror $0348 ROR DOS_TEMP +.394afc 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 +.394afe 66 28 ror $0348 ROR DOS_TEMP +.394b00 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 +.394b02 66 28 ror $0348 ROR DOS_TEMP +.394b04 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 +.394b06 66 28 ror $0348 ROR DOS_TEMP +.394b08 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 +.394b0a 66 28 ror $0348 ROR DOS_TEMP +.394b0c 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 +.394b0e 66 28 ror $0348 ROR DOS_TEMP +.394b10 46 2a lsr $034a LSR DOS_TEMP+2 ; DOS_TEMP := DOS_TEMP / 512 +.394b12 66 28 ror $0348 ROR DOS_TEMP +.394b14 18 clc CLC ; DOS_FAT_LBA should be the LBA of the first FAT sector we need +.394b15 af 14 a0 38 lda $38a014 LDA FAT_BEGIN_LBA +.394b19 65 28 adc $0348 ADC DOS_TEMP +.394b1b 85 24 sta $0344 STA DOS_FAT_LBA +.394b1d af 16 a0 38 lda $38a016 LDA FAT_BEGIN_LBA+2 +.394b21 65 2a adc $034a ADC DOS_TEMP+2 +.394b23 85 26 sta $0346 STA DOS_FAT_LBA+2 +.394b25 28 plp PLP +.394b26 2b pld PLD +.394b27 ab plb PLB +.394b28 6b rtl RTL +.394b29 FATFORCLUSTER12 +.394b29 8b phb PHB +.394b2a 0b phd PHD +.394b2b 08 php PHP +.394b2c 48 pha PHA ; begin setdbr macro +.394b2d 08 php PHP +.394b2e e2 20 sep #$20 SEP #$20 ; set A short +.394b30 a9 00 lda #$00 LDA #0 +.394b32 48 pha PHA +.394b33 ab plb PLB +.394b34 28 plp PLP +.394b35 68 pla PLA ; end setdbr macro +.394b36 48 pha PHA ; begin setdp macro +.394b37 08 php PHP +.394b38 c2 20 rep #$20 REP #$20 ; set A long +.394b3a a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394b3d 5b tcd TCD +.394b3e 28 plp PLP +.394b3f 68 pla PLA ; end setdp macro +.394b40 c2 30 rep #$30 REP #$30 ; set A&X long +.394b42 a2 00 00 ldx #$0000 LDX #0 +.394b45 a9 5a 5a lda #$5a5a LDA #$5A5A +.394b48 8f 00 a5 38 sta $38a500 clr_loop STA DOS_FAT_SECTORS +.394b4c e8 inx INX +.394b4d e8 inx INX +.394b4e e0 00 04 cpx #$0400 CPX #1024 +.394b51 d0 f5 bne $394b48 BNE clr_loop +.394b53 22 b6 4a 39 jsl $394ab6 JSL ENTRYFORCLUS12 ; Calculate the LBA +.394b57 a5 24 lda $0344 LDA DOS_FAT_LBA ; Point to the desired sector in the FAT +.394b59 85 02 sta $0322 STA BIOS_LBA +.394b5b a5 26 lda $0346 LDA DOS_FAT_LBA+2 +.394b5d 85 04 sta $0324 STA BIOS_LBA+2 +.394b5f a9 00 a5 lda #$a500 LDA #<>DOS_FAT_SECTORS ; Point to the first 512 bytes of the FAT buffer +.394b62 85 06 sta $0326 STA BIOS_BUFF_PTR +.394b64 a9 38 00 lda #$0038 LDA #`DOS_FAT_SECTORS +.394b67 85 08 sta $0328 STA BIOS_BUFF_PTR+2 +.394b69 22 44 10 00 jsl $001044 JSL GETBLOCK ; Attempt to load the first FAT sector +.394b6d 90 17 bcc $394b86 BCC error +.394b6f e6 02 inc $0322 INC BIOS_LBA ; Move to the next sector +.394b71 a9 00 a7 lda #$a700 LDA #<>DOS_FAT_SECTORS+512 ; And point to the second 512 bytes of teh FAT buffer +.394b74 85 06 sta $0326 STA BIOS_BUFF_PTR +.394b76 a9 38 00 lda #$0038 LDA #`DOS_FAT_SECTORS +.394b79 85 08 sta $0328 STA BIOS_BUFF_PTR+2 +.394b7b 22 44 10 00 jsl $001044 JSL GETBLOCK ; Attempt to load the first FAT sector +.394b7f 90 05 bcc $394b86 BCC error +.394b81 28 plp PLP +.394b82 2b pld PLD +.394b83 ab plb PLB +.394b84 38 sec SEC +.394b85 6b rtl RTL +.394b86 error +.394b86 e2 20 sep #$20 SEP #$20 ; set A short +.394b88 a9 06 lda #$06 LDA #DOS_ERR_FAT +.394b8a 85 0e sta $032e STA DOS_STATUS +.394b8c 28 plp PLP +.394b8d 2b pld PLD +.394b8e ab plb PLB +.394b8f 18 clc CLC +.394b90 6b rtl RTL +.394b91 FATFORCLUSTER32 +.394b91 8b phb PHB +.394b92 0b phd PHD +.394b93 48 pha PHA ; begin setdbr macro +.394b94 08 php PHP +.394b95 e2 20 sep #$20 SEP #$20 ; set A short +.394b97 a9 00 lda #$00 LDA #0 +.394b99 48 pha PHA +.394b9a ab plb PLB +.394b9b 28 plp PLP +.394b9c 68 pla PLA ; end setdbr macro +.394b9d 48 pha PHA ; begin setdp macro +.394b9e 08 php PHP +.394b9f c2 20 rep #$20 REP #$20 ; set A long +.394ba1 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394ba4 5b tcd TCD +.394ba5 28 plp PLP +.394ba6 68 pla PLA ; end setdp macro +.394ba7 c2 30 rep #$30 REP #$30 ; set A&X long +.394ba9 a5 10 lda $0330 LDA DOS_CLUS_ID +.394bab 85 24 sta $0344 STA DOS_FAT_LBA +.394bad a5 12 lda $0332 LDA DOS_CLUS_ID+2 +.394baf 85 26 sta $0346 STA DOS_FAT_LBA+2 +.394bb1 a2 07 00 ldx #$0007 LDX #7 +.394bb4 46 26 lsr $0346 div_loop LSR DOS_FAT_LBA+2 +.394bb6 66 24 ror $0344 ROR DOS_FAT_LBA +.394bb8 ca dex DEX +.394bb9 d0 f9 bne $394bb4 BNE div_loop +.394bbb 18 clc CLC +.394bbc a5 24 lda $0344 LDA DOS_FAT_LBA +.394bbe 6f 14 a0 38 adc $38a014 ADC FAT_BEGIN_LBA +.394bc2 85 24 sta $0344 STA DOS_FAT_LBA +.394bc4 a5 26 lda $0346 LDA DOS_FAT_LBA+2 +.394bc6 6f 16 a0 38 adc $38a016 ADC FAT_BEGIN_LBA+2 +.394bca 85 26 sta $0346 STA DOS_FAT_LBA+2 +.394bcc a5 24 lda $0344 LDA DOS_FAT_LBA ; We want to load the FAT sector +.394bce 85 02 sta $0322 STA BIOS_LBA +.394bd0 a5 26 lda $0346 LDA DOS_FAT_LBA+2 +.394bd2 85 04 sta $0324 STA BIOS_LBA+2 +.394bd4 a9 00 a5 lda #$a500 LDA #<>DOS_FAT_SECTORS ; We want to load the FAT sector in DOS_FAT_SECTORS +.394bd7 85 06 sta $0326 STA BIOS_BUFF_PTR +.394bd9 a9 38 00 lda #$0038 LDA #`DOS_FAT_SECTORS +.394bdc 85 08 sta $0328 STA BIOS_BUFF_PTR+2 +.394bde 22 44 10 00 jsl $001044 JSL GETBLOCK ; Load the FAT entry +.394be2 b0 06 bcs $394bea BCS find_entry +.394be4 e2 20 sep #$20 SEP #$20 ; set A short +.394be6 a9 06 lda #$06 LDA #DOS_ERR_FAT +.394be8 80 0e bra $394bf8 BRA ret_failure +.394bea find_entry +.394bea c2 20 rep #$20 REP #$20 ; set A long +.394bec a5 10 lda $0330 LDA DOS_CLUS_ID +.394bee 0a asl a ASL A +.394bef 0a asl a ASL A ; * 4 +.394bf0 29 ff 01 and #$01ff AND #$1FF ; DOS_CLUS_ID MOD 512 +.394bf3 aa tax TAX ; X should be the offset within the sector +.394bf4 2b pld ret_success PLD +.394bf5 ab plb PLB +.394bf6 38 sec SEC ; return success +.394bf7 6b rtl RTL +.394bf8 2b pld ret_failure PLD +.394bf9 ab plb PLB +.394bfa 18 clc CLC ; Return failure +.394bfb 6b rtl RTL +.394bfc NEXTCLUSTER +.394bfc 08 php PHP +.394bfd e2 20 sep #$20 SEP #$20 ; set A short +.394bff af 01 a0 38 lda $38a001 LDA @l FILE_SYSTEM ; Get the file system code +.394c03 c9 00 cmp #$00 CMP #PART_TYPE_FAT12 ; Is it FAT12? +.394c05 d0 08 bne $394c0f BNE fat32 ; No: assume it's FAT32 +.394c07 22 1d 4c 39 jsl $394c1d fat12 JSL NEXTCLUSTER12 ; Lookup the next cluster from FAT12 +.394c0b 90 0d bcc $394c1a BCC pass_failure ; If there was an error, pass it up the chain +.394c0d 80 06 bra $394c15 BRA ret_success +.394c0f 22 85 4c 39 jsl $394c85 fat32 JSL NEXTCLUSTER32 ; Lookup the next cluster from FAT32 +.394c13 90 05 bcc $394c1a BCC pass_failure ; If there was an error, pass it up the chain +.394c15 64 0e stz $032e ret_success STZ DOS_STATUS +.394c17 28 plp PLP +.394c18 38 sec SEC +.394c19 6b rtl RTL +.394c1a 28 plp pass_failure PLP +.394c1b 18 clc CLC +.394c1c 6b rtl RTL +.394c1d NEXTCLUSTER12 +.394c1d 8b phb PHB +.394c1e 0b phd PHD +.394c1f 08 php PHP +.394c20 48 pha PHA ; begin setdbr macro +.394c21 08 php PHP +.394c22 e2 20 sep #$20 SEP #$20 ; set A short +.394c24 a9 00 lda #$00 LDA #0 +.394c26 48 pha PHA +.394c27 ab plb PLB +.394c28 28 plp PLP +.394c29 68 pla PLA ; end setdbr macro +.394c2a 48 pha PHA ; begin setdp macro +.394c2b 08 php PHP +.394c2c c2 20 rep #$20 REP #$20 ; set A long +.394c2e a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394c31 5b tcd TCD +.394c32 28 plp PLP +.394c33 68 pla PLA ; end setdp macro +.394c34 c2 30 rep #$30 REP #$30 ; set A&X long +.394c36 22 29 4b 39 jsl $394b29 JSL FATFORCLUSTER12 ; Attempt to load the FAT entries +.394c3a b0 03 bcs $394c3f BCS chk_clus_id +.394c3c 82 41 00 brl $394c80 BRL pass_failure +.394c3f a5 10 lda $0330 chk_clus_id LDA DOS_CLUS_ID ; Check the cluster ID... +.394c41 89 01 00 bit #$0001 BIT #1 ; Is it odd? +.394c44 d0 0d bne $394c53 BNE is_odd ; Yes: calculate the next cluster for odd +.394c46 is_even +.394c46 c2 20 rep #$20 REP #$20 ; set A long +.394c48 bf 00 a5 38 lda $38a500,x LDA DOS_FAT_SECTORS,X ; DOS_CLUS_ID := DOS_FAT_SECTORS[X] & $0FFF +.394c4c 29 ff 0f and #$0fff AND #$0FFF +.394c4f 85 28 sta $0348 STA DOS_TEMP +.394c51 80 0c bra $394c5f BRA check_id +.394c53 is_odd +.394c53 c2 20 rep #$20 REP #$20 ; set A long +.394c55 bf 00 a5 38 lda $38a500,x LDA DOS_FAT_SECTORS,X ; DOS_CLUS_ID := DOS_FAT_SECTORS[X] >> 4 +.394c59 4a lsr a LSR A +.394c5a 4a lsr a LSR A +.394c5b 4a lsr a LSR A +.394c5c 4a lsr a LSR A +.394c5d 85 28 sta $0348 STA DOS_TEMP +.394c5f check_id +.394c5f c2 20 rep #$20 REP #$20 ; set A long +.394c61 a5 28 lda $0348 LDA DOS_TEMP ; Check the new cluster ID we got +.394c63 29 f0 0f and #$0ff0 AND #$0FF0 ; Is it in the range $0FF0 -- $0FFF? +.394c66 c9 f0 0f cmp #$0ff0 CMP #$0FF0 +.394c69 f0 0f beq $394c7a BEQ no_more ; Yes: return that we've reached the end of the chain +.394c6b a5 28 lda $0348 LDA DOS_TEMP ; Restore the "current" cluster ID +.394c6d 85 10 sta $0330 STA DOS_CLUS_ID +.394c6f 64 12 stz $0332 STZ DOS_CLUS_ID+2 +.394c71 ret_success +.394c71 e2 20 sep #$20 SEP #$20 ; set A short +.394c73 64 0e stz $032e STZ DOS_STATUS +.394c75 28 plp PLP +.394c76 2b pld PLD +.394c77 ab plb PLB +.394c78 38 sec SEC +.394c79 6b rtl RTL +.394c7a no_more +.394c7a e2 20 sep #$20 SEP #$20 ; set A short +.394c7c a9 0a lda #$0a LDA #DOS_ERR_NOCLUSTER +.394c7e 85 0e sta $032e STA DOS_STATUS +.394c80 28 plp pass_failure PLP +.394c81 2b pld PLD +.394c82 ab plb PLB +.394c83 18 clc CLC +.394c84 6b rtl RTL +.394c85 NEXTCLUSTER32 +.394c85 8b phb PHB +.394c86 0b phd PHD +.394c87 08 php PHP +.394c88 48 pha PHA ; begin setdbr macro +.394c89 08 php PHP +.394c8a e2 20 sep #$20 SEP #$20 ; set A short +.394c8c a9 00 lda #$00 LDA #0 +.394c8e 48 pha PHA +.394c8f ab plb PLB +.394c90 28 plp PLP +.394c91 68 pla PLA ; end setdbr macro +.394c92 48 pha PHA ; begin setdp macro +.394c93 08 php PHP +.394c94 c2 20 rep #$20 REP #$20 ; set A long +.394c96 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394c99 5b tcd TCD +.394c9a 28 plp PLP +.394c9b 68 pla PLA ; end setdp macro +.394c9c c2 30 rep #$30 REP #$30 ; set A&X long +.394c9e 22 91 4b 39 jsl $394b91 JSL FATFORCLUSTER32 ; Get the FAT entry for this cluster +.394ca2 90 53 bcc $394cf7 BCC ret_failure ; If it did not work, return the error +.394ca4 e2 20 sep #$20 SEP #$20 ; set A short +.394ca6 bf 00 a5 38 lda $38a500,x LDA @l DOS_FAT_SECTORS,X ; Get the entry and copy it to DOS_TEMP +.394caa 85 28 sta $0348 STA DOS_TEMP +.394cac bf 01 a5 38 lda $38a501,x LDA @l DOS_FAT_SECTORS+1,X +.394cb0 85 29 sta $0349 STA DOS_TEMP+1 +.394cb2 bf 02 a5 38 lda $38a502,x LDA @l DOS_FAT_SECTORS+2,X +.394cb6 85 2a sta $034a STA DOS_TEMP+2 +.394cb8 bf 03 a5 38 lda $38a503,x LDA @l DOS_FAT_SECTORS+3,X +.394cbc 85 2b sta $034b STA DOS_TEMP+3 +.394cbe a5 28 lda $0348 xxxx LDA DOS_TEMP ; Is DOS_TEMP = $FFFFFFFF? +.394cc0 c9 ff cmp #$ff CMP #$FF +.394cc2 d0 18 bne $394cdc BNE found_next +.394cc4 a5 29 lda $0349 LDA DOS_TEMP+1 +.394cc6 c9 ff cmp #$ff CMP #$FF +.394cc8 d0 12 bne $394cdc BNE found_next +.394cca a5 2a lda $034a LDA DOS_TEMP+2 +.394ccc c9 ff cmp #$ff CMP #$FF +.394cce d0 0c bne $394cdc BNE found_next +.394cd0 a5 2b lda $034b LDA DOS_TEMP+3 +.394cd2 c9 0f cmp #$0f CMP #$0F +.394cd4 d0 06 bne $394cdc BNE found_next ; No: return this cluster as the next +.394cd6 e2 20 sep #$20 SEP #$20 ; set A short +.394cd8 a9 0a lda #$0a LDA #DOS_ERR_NOCLUSTER ; Yes: return that there are no more clusters +.394cda 80 1b bra $394cf7 BRA ret_failure +.394cdc found_next +.394cdc e2 20 sep #$20 SEP #$20 ; set A short +.394cde a5 28 lda $0348 LDA DOS_TEMP ; No: return DOS_TEMP as the new DOS_CLUS_ID +.394ce0 85 10 sta $0330 STA DOS_CLUS_ID +.394ce2 a5 29 lda $0349 LDA DOS_TEMP+1 +.394ce4 85 11 sta $0331 STA DOS_CLUS_ID+1 +.394ce6 a5 2a lda $034a LDA DOS_TEMP+2 +.394ce8 85 12 sta $0332 STA DOS_CLUS_ID+2 +.394cea a5 2b lda $034b LDA DOS_TEMP+3 +.394cec 85 13 sta $0333 STA DOS_CLUS_ID+3 +.394cee ret_success +.394cee e2 20 sep #$20 SEP #$20 ; set A short +.394cf0 64 0e stz $032e STZ DOS_STATUS ; Record success +.394cf2 28 plp PLP +.394cf3 2b pld PLD +.394cf4 ab plb PLB +.394cf5 38 sec SEC +.394cf6 6b rtl RTL +.394cf7 ret_failure +.394cf7 e2 20 sep #$20 SEP #$20 ; set A short +.394cf9 85 0e sta $032e STA DOS_STATUS ; Record the error condition +.394cfb 28 plp PLP +.394cfc 2b pld PLD +.394cfd ab plb PLB +.394cfe 18 clc CLC +.394cff 6b rtl RTL +.394d00 DOS_READNEXT +.394d00 08 php PHP +.394d01 c2 30 rep #$30 REP #$30 ; set A&X long +.394d03 22 fc 4b 39 jsl $394bfc JSL NEXTCLUSTER ; Attempt to find the next cluster in the FAT +.394d07 90 09 bcc $394d12 BCC pass_failure ; If nothing found: pass the failure up the chain +.394d09 22 ec 47 39 jsl $3947ec JSL DOS_GETCLUSTER ; Otherwise: attempt to read the cluster +.394d0d 90 03 bcc $394d12 BCC pass_failure ; If nothing read: pass the failure up the chain +.394d0f 28 plp ret_success PLP +.394d10 38 sec SEC +.394d11 6b rtl RTL +.394d12 28 plp pass_failure PLP +.394d13 18 clc CLC +.394d14 6b rtl RTL +.394d15 DOS_FREECLUS +.394d15 08 php PHP +.394d16 48 pha PHA ; begin setdp macro +.394d17 08 php PHP +.394d18 c2 20 rep #$20 REP #$20 ; set A long +.394d1a a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394d1d 5b tcd TCD +.394d1e 28 plp PLP +.394d1f 68 pla PLA ; end setdp macro +.394d20 e2 20 sep #$20 SEP #$20 ; set A short +.394d22 af 01 a0 38 lda $38a001 LDA @l FILE_SYSTEM ; Get the file system code +.394d26 c9 00 cmp #$00 CMP #PART_TYPE_FAT12 ; Is it FAT12? +.394d28 d0 08 bne $394d32 BNE fat32 ; No: assume it's FAT32 +.394d2a 22 a6 4d 39 jsl $394da6 fat12 JSL DOS_FREECLUS12 ; Find the next free cluster from FAT12 +.394d2e 90 0d bcc $394d3d BCC pass_failure ; If there was an error, pass it up the chain +.394d30 80 06 bra $394d38 BRA ret_success +.394d32 22 7e 4e 39 jsl $394e7e fat32 JSL DOS_FREECLUS32 ; Find the next free cluster from FAT32 +.394d36 90 05 bcc $394d3d BCC pass_failure ; If there was an error, pass it up the chain +.394d38 64 0e stz $032e ret_success STZ DOS_STATUS +.394d3a 28 plp PLP +.394d3b 38 sec SEC +.394d3c 6b rtl RTL +.394d3d 28 plp pass_failure PLP +.394d3e 18 clc CLC +.394d3f 6b rtl RTL +.394d40 FDC_READ2FAT12 +.394d40 8b phb PHB +.394d41 0b phd PHD +.394d42 08 php PHP +.394d43 48 pha PHA ; begin setdbr macro +.394d44 08 php PHP +.394d45 e2 20 sep #$20 SEP #$20 ; set A short +.394d47 a9 00 lda #$00 LDA #0 +.394d49 48 pha PHA +.394d4a ab plb PLB +.394d4b 28 plp PLP +.394d4c 68 pla PLA ; end setdbr macro +.394d4d 48 pha PHA ; begin setdp macro +.394d4e 08 php PHP +.394d4f c2 20 rep #$20 REP #$20 ; set A long +.394d51 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394d54 5b tcd TCD +.394d55 28 plp PLP +.394d56 68 pla PLA ; end setdp macro +.394d57 c2 30 rep #$30 REP #$30 ; set A&X long +.394d59 a9 00 a5 lda #$a500 LDA #<>DOS_FAT_SECTORS ; Set the location to store the sector +.394d5c 85 06 sta $0326 STA BIOS_BUFF_PTR +.394d5e a9 38 00 lda #$0038 LDA #`DOS_FAT_SECTORS +.394d61 85 08 sta $0328 STA BIOS_BUFF_PTR+2 +.394d63 a5 24 lda $0344 LDA DOS_FAT_LBA +.394d65 85 02 sta $0322 STA BIOS_LBA +.394d67 a5 26 lda $0346 LDA DOS_FAT_LBA+2 +.394d69 85 04 sta $0324 STA BIOS_LBA+2 +.394d6b 22 44 10 00 jsl $001044 JSL GETBLOCK ; Read the first sector +.394d6f b0 07 bcs $394d78 BCS inc_sect2 ; If success: start getting the second sector +.394d71 e2 20 sep #$20 SEP #$20 ; set A short +.394d73 a9 06 lda #$06 LDA #DOS_ERR_FAT +.394d75 82 1c 00 brl $394d94 BRL ret_failure +.394d78 inc_sect2 +.394d78 c2 20 rep #$20 REP #$20 ; set A long +.394d7a e6 02 inc $0322 INC BIOS_LBA ; Move to the next sector +.394d7c d0 02 bne $394d80 BNE inc_buff_ptr +.394d7e e6 04 inc $0324 INC BIOS_LBA+2 +.394d80 a9 00 a7 lda #$a700 inc_buff_ptr LDA #<>(DOS_FAT_SECTORS+DOS_SECTOR_SIZE) +.394d83 85 06 sta $0326 STA BIOS_BUFF_PTR +.394d85 a9 38 00 lda #$0038 LDA #`(DOS_FAT_SECTORS+DOS_SECTOR_SIZE) +.394d88 85 08 sta $0328 STA BIOS_BUFF_PTR+2 +.394d8a 22 44 10 00 jsl $001044 JSL GETBLOCK ; Read the second sector +.394d8e b0 0d bcs $394d9d BCS ret_success ; If success, return success +.394d90 e2 20 sep #$20 SEP #$20 ; set A short +.394d92 a9 06 lda #$06 LDA #DOS_ERR_FAT +.394d94 ret_failure +.394d94 e2 20 sep #$20 SEP #$20 ; set A short +.394d96 85 00 sta $0320 STA BIOS_STATUS +.394d98 28 plp PLP +.394d99 2b pld PLD +.394d9a ab plb PLB +.394d9b 18 clc CLC +.394d9c 6b rtl RTL +.394d9d ret_success +.394d9d e2 20 sep #$20 SEP #$20 ; set A short +.394d9f 64 00 stz $0320 STZ BIOS_STATUS +.394da1 28 plp PLP +.394da2 2b pld PLD +.394da3 ab plb PLB +.394da4 38 sec SEC +.394da5 6b rtl RTL +.394da6 DOS_FREECLUS12 +.394da6 da phx PHX +.394da7 8b phb PHB +.394da8 0b phd PHD +.394da9 08 php PHP +.394daa 48 pha PHA ; begin setdbr macro +.394dab 08 php PHP +.394dac e2 20 sep #$20 SEP #$20 ; set A short +.394dae a9 00 lda #$00 LDA #0 +.394db0 48 pha PHA +.394db1 ab plb PLB +.394db2 28 plp PLP +.394db3 68 pla PLA ; end setdbr macro +.394db4 48 pha PHA ; begin setdp macro +.394db5 08 php PHP +.394db6 c2 20 rep #$20 REP #$20 ; set A long +.394db8 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394dbb 5b tcd TCD +.394dbc 28 plp PLP +.394dbd 68 pla PLA ; end setdp macro +.394dbe c2 30 rep #$30 REP #$30 ; set A&X long +.394dc0 a9 02 00 lda #$0002 LDA #2 ; Cluster ID is 2 to start with +.394dc3 85 10 sta $0330 STA DOS_CLUS_ID +.394dc5 a9 00 00 lda #$0000 LDA #0 +.394dc8 85 12 sta $0332 STA DOS_CLUS_ID+2 +.394dca 22 b6 4a 39 jsl $394ab6 JSL ENTRYFORCLUS12 ; Calculate the LBA and buffer offset for the cluster +.394dce 22 40 4d 39 jsl $394d40 JSL FDC_READ2FAT12 ; Read the first two sectors of the FAT +.394dd2 b0 07 bcs $394ddb BCS start_of_fat ; If success, move X to the start of the FAT +.394dd4 e2 20 sep #$20 SEP #$20 ; set A short +.394dd6 a9 06 lda #$06 LDA #DOS_ERR_FAT +.394dd8 82 99 00 brl $394e74 BRL ret_failure +.394ddb start_of_fat +.394ddb c2 30 rep #$30 REP #$30 ; set A&X long +.394ddd a5 10 lda $0330 chk_cluster LDA DOS_CLUS_ID ; Check to see if cluster number is even or odd +.394ddf 89 01 00 bit #$0001 BIT #1 +.394de2 d0 09 bne $394ded BNE is_odd +.394de4 bf 00 a5 38 lda $38a500,x is_even LDA DOS_FAT_SECTORS,X ; Get the cluster status for an even numbered cluster +.394de8 29 ff 0f and #$0fff AND #$0FFF +.394deb 80 08 bra $394df5 BRA chk_available +.394ded bf 00 a5 38 lda $38a500,x is_odd LDA DOS_FAT_SECTORS,X ; Get the cluster status for an odd numbered cluster +.394df1 4a lsr a LSR A +.394df2 4a lsr a LSR A +.394df3 4a lsr a LSR A +.394df4 4a lsr a LSR A +.394df5 chk_available +.394df5 85 28 sta $0348 STA DOS_TEMP +.394df7 c9 00 00 cmp #$0000 CMP #0 ; Is it available? +.394dfa f0 03 beq $394dff BEQ chk_found +.394dfc 82 39 00 brl $394e38 BRL next_cluster ; No: advance to the next cluster +.394dff 8a txa chk_found TXA +.394e00 85 2a sta $034a STA DOS_TEMP+2 +.394e02 a5 10 lda $0330 LDA DOS_CLUS_ID ; Check to see if cluster number is even or odd +.394e04 89 01 00 bit #$0001 BIT #1 +.394e07 d0 0d bne $394e16 BNE is_odd2 +.394e09 is_even2 +.394e09 bf 00 a5 38 lda $38a500,x LDA DOS_FAT_SECTORS,X ; Reserve the cluster in the FAT, even offset case +.394e0d 09 ff 0f ora #$0fff ORA #$0FFF +.394e10 9f 00 a5 38 sta $38a500,x STA DOS_FAT_SECTORS,X +.394e14 80 0b bra $394e21 BRA write_fat +.394e16 is_odd2 +.394e16 bf 00 a5 38 lda $38a500,x LDA DOS_FAT_SECTORS,X ; Reserve the cluster in the FAT, odd offset case +.394e1a 09 f0 ff ora #$fff0 ORA #$FFF0 +.394e1d 9f 00 a5 38 sta $38a500,x STA DOS_FAT_SECTORS,X +.394e21 22 48 4f 39 jsl $394f48 write_fat JSL WRITEFAT12 ; Write the two FAT sectors back to disk +.394e25 b0 07 bcs $394e2e BCS ret_success ; If success: return success +.394e27 e2 20 sep #$20 SEP #$20 ; set A short +.394e29 a9 14 lda #$14 LDA #DOS_ERR_FATUPDATE ; Flag an error trying to write the FAT back +.394e2b 82 46 00 brl $394e74 BRL ret_failure +.394e2e ret_success +.394e2e e2 20 sep #$20 SEP #$20 ; set A short +.394e30 64 0e stz $032e STZ DOS_STATUS +.394e32 28 plp PLP +.394e33 2b pld PLD +.394e34 ab plb PLB +.394e35 fa plx PLX +.394e36 38 sec SEC +.394e37 6b rtl RTL +.394e38 next_cluster +.394e38 e6 10 inc $0330 INC DOS_CLUS_ID ; And advance the cluster ID +.394e3a d0 02 bne $394e3e BNE calc_entry +.394e3c e6 12 inc $0332 INC DOS_CLUS_ID+2 +.394e3e 22 b6 4a 39 jsl $394ab6 calc_entry JSL ENTRYFORCLUS12 ; Calculate the LBA and offset into the buffer for the cluster +.394e42 e0 00 00 cpx #$0000 CPX #0 ; Did we wrap around? +.394e45 f0 03 beq $394e4a BEQ chk_end_of_fat +.394e47 82 93 ff brl $394ddd BRL chk_cluster ; No: go back and check it too +.394e4a chk_end_of_fat +.394e4a a5 24 lda $0344 LDA DOS_FAT_LBA ; Are we at the end of the FAT? +.394e4c cf 18 a0 38 cmp $38a018 CMP FAT2_BEGIN_LBA ; NOTE: we use the start sector of the second FAT as our sentinel +.394e50 d0 0f bne $394e61 BNE next_2 +.394e52 a5 26 lda $0346 LDA DOS_FAT_LBA+2 +.394e54 cf 1a a0 38 cmp $38a01a CMP FAT2_BEGIN_LBA+2 +.394e58 d0 07 bne $394e61 BNE next_2 ; No: get the next to sectors +.394e5a e2 20 sep #$20 SEP #$20 ; set A short +.394e5c a9 12 lda #$12 LDA #DOS_ERR_MEDIAFULL ; Yes: return media full +.394e5e 82 13 00 brl $394e74 BRL ret_failure +.394e61 next_2 +.394e61 22 40 4d 39 jsl $394d40 JSL FDC_READ2FAT12 ; Read the next two sectors of the FAT +.394e65 90 06 bcc $394e6d BCC fat_fail ; If failed: return error +.394e67 a2 00 00 ldx #$0000 LDX #0 ; If success: Start scanning at the beginning of the sectors +.394e6a 82 70 ff brl $394ddd BRL chk_cluster ; And start checking from there +.394e6d fat_fail +.394e6d e2 20 sep #$20 SEP #$20 ; set A short +.394e6f a9 06 lda #$06 LDA #DOS_ERR_FAT +.394e71 82 00 00 brl $394e74 BRL ret_failure +.394e74 ret_failure +.394e74 e2 20 sep #$20 SEP #$20 ; set A short +.394e76 85 0e sta $032e STA DOS_STATUS +.394e78 28 plp PLP +.394e79 2b pld PLD +.394e7a ab plb PLB +.394e7b fa plx PLX +.394e7c 18 clc CLC +.394e7d 6b rtl RTL +.394e7e DOS_FREECLUS32 +.394e7e 8b phb PHB +.394e7f 0b phd PHD +.394e80 08 php PHP +.394e81 48 pha PHA ; begin setdbr macro +.394e82 08 php PHP +.394e83 e2 20 sep #$20 SEP #$20 ; set A short +.394e85 a9 00 lda #$00 LDA #0 +.394e87 48 pha PHA +.394e88 ab plb PLB +.394e89 28 plp PLP +.394e8a 68 pla PLA ; end setdbr macro +.394e8b 48 pha PHA ; begin setdp macro +.394e8c 08 php PHP +.394e8d c2 20 rep #$20 REP #$20 ; set A long +.394e8f a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394e92 5b tcd TCD +.394e93 28 plp PLP +.394e94 68 pla PLA ; end setdp macro +.394e95 c2 30 rep #$30 REP #$30 ; set A&X long +.394e97 a9 00 a3 lda #$a300 LDA #<>DOS_SECTOR ; Set the location to store the sector +.394e9a 85 06 sta $0326 STA BIOS_BUFF_PTR +.394e9c a9 38 00 lda #$0038 LDA #`DOS_SECTOR +.394e9f 85 08 sta $0328 STA BIOS_BUFF_PTR+2 +.394ea1 af 14 a0 38 lda $38a014 LDA FAT_BEGIN_LBA ; Set the LBA to that of the first FAT sector +.394ea5 85 02 sta $0322 STA BIOS_LBA +.394ea7 af 16 a0 38 lda $38a016 LDA FAT_BEGIN_LBA+2 +.394eab 85 04 sta $0324 STA BIOS_LBA+2 +.394ead 22 44 10 00 jsl $001044 JSL GETBLOCK ; Load the sector into memory +.394eb1 b0 07 bcs $394eba BCS initial_entry ; If OK: set the initial entry to check +.394eb3 e2 20 sep #$20 SEP #$20 ; set A short +.394eb5 a9 06 lda #$06 LDA #DOS_ERR_FAT ; Return a NOFAT error +.394eb7 82 6b 00 brl $394f25 BRL ret_failure +.394eba initial_entry +.394eba c2 20 rep #$20 REP #$20 ; set A long +.394ebc a9 02 00 lda #$0002 LDA #2 ; Set DOS_CLUS_ID to 2 +.394ebf 85 10 sta $0330 STA DOS_CLUS_ID +.394ec1 a9 00 00 lda #$0000 LDA #0 +.394ec4 85 12 sta $0332 STA DOS_CLUS_ID+2 +.394ec6 a2 08 00 ldx #$0008 LDX #8 ; Set the offset to DOS_CLUS_ID * 4 +.394ec9 bf 00 a3 38 lda $38a300,x chk_entry LDA DOS_SECTOR,X ; Is the cluster entry == $00000000? +.394ecd d0 06 bne $394ed5 BNE next_entry ; No: move to the next entry +.394ecf bf 02 a3 38 lda $38a302,x LDA DOS_SECTOR+2,X +.394ed3 f0 36 beq $394f0b BEQ found_free ; Yes: go to allocate and return it +.394ed5 e6 10 inc $0330 next_entry INC DOS_CLUS_ID ; Move to the next cluster +.394ed7 d0 02 bne $394edb BNE inc_ptr +.394ed9 e6 12 inc $0332 INC DOS_CLUS_ID+2 +.394edb e8 inx inc_ptr INX ; Update the index to the entry +.394edc e8 inx INX +.394edd e8 inx INX +.394ede e8 inx INX +.394edf e0 00 02 cpx #$0200 CPX #DOS_SECTOR_SIZE ; Are we outside the sector? +.394ee2 90 e5 bcc $394ec9 BLT chk_entry ; No: check this entry +.394ee4 e6 02 inc $0322 INC BIOS_LBA ; Point to the next sector in the FAT +.394ee6 d0 18 bne $394f00 BNE get_block +.394ee8 e6 04 inc $0324 INC BIOS_LBA+2 +.394eea a5 04 lda $0324 LDA BIOS_LBA+2 +.394eec cf 1a a0 38 cmp $38a01a CMP FAT2_BEGIN_LBA+2 +.394ef0 90 0e bcc $394f00 BLT get_block +.394ef2 a5 02 lda $0322 LDA BIOS_LBA +.394ef4 cf 18 a0 38 cmp $38a018 CMP FAT2_BEGIN_LBA +.394ef8 90 06 bcc $394f00 BLT get_block +.394efa e2 20 sep #$20 SEP #$20 ; set A short +.394efc a9 12 lda #$12 LDA #DOS_ERR_MEDIAFULL ; No: throw a media full error +.394efe 80 25 bra $394f25 BRA ret_failure +.394f00 22 44 10 00 jsl $001044 get_block JSL GETBLOCK ; Attempt to read the block +.394f04 90 1b bcc $394f21 BCC ret_fat_error ; If error: throw a FAT error +.394f06 a2 00 00 ldx #$0000 set_ptr LDX #0 ; Set index pointer to the first entry +.394f09 80 be bra $394ec9 BRA chk_entry ; Check this entry +.394f0b found_free +.394f0b c2 20 rep #$20 REP #$20 ; set A long +.394f0d a9 ff ff lda #$ffff LDA #<>FAT_LAST_CLUSTER ; Set the entry to $0FFFFFFF to make it the last entry in its chain +.394f10 9f 00 a3 38 sta $38a300,x STA DOS_SECTOR,X +.394f14 a9 ff 0f lda #$0fff LDA #(FAT_LAST_CLUSTER >> 16) +.394f17 9f 02 a3 38 sta $38a302,x STA DOS_SECTOR+2,X +.394f1b 22 24 10 00 jsl $001024 JSL PUTBLOCK ; Write the sector back to the block device +.394f1f b0 0d bcs $394f2e BCS ret_success ; If OK: return success +.394f21 ret_fat_error +.394f21 e2 20 sep #$20 SEP #$20 ; set A short +.394f23 a9 06 lda #$06 LDA #DOS_ERR_FAT ; Otherwise: return NOFAT error +.394f25 ret_failure +.394f25 e2 20 sep #$20 SEP #$20 ; set A short +.394f27 85 0e sta $032e STA DOS_STATUS +.394f29 28 plp PLP +.394f2a 2b pld PLD +.394f2b ab plb PLB +.394f2c 18 clc CLC +.394f2d 6b rtl RTL +.394f2e ret_success +.394f2e e2 20 sep #$20 SEP #$20 ; set A short +.394f30 64 0e stz $032e STZ DOS_STATUS +.394f32 28 plp PLP +.394f33 2b pld PLD +.394f34 ab plb PLB +.394f35 38 sec SEC +.394f36 6b rtl RTL +.394f37 DELCLUSTER +.394f37 e2 20 sep #$20 SEP #$20 ; set A short +.394f39 af 01 a0 38 lda $38a001 LDA @l FILE_SYSTEM ; Get the file system code +.394f3d c9 00 cmp #$00 CMP #PART_TYPE_FAT12 ; Is it FAT12? +.394f3f d0 04 bne $394f45 BNE fat32 ; No: assume it's FAT32 +.394f41 5c 8f 4f 39 jmp $394f8f fat12 JML DELCLUSTER12 +.394f45 4c dd 4f jmp $394fdd fat32 JMP DELCLUSTER32 +.394f48 WRITEFAT12 +.394f48 8b phb PHB +.394f49 0b phd PHD +.394f4a 48 pha PHA ; begin setdbr macro +.394f4b 08 php PHP +.394f4c e2 20 sep #$20 SEP #$20 ; set A short +.394f4e a9 00 lda #$00 LDA #0 +.394f50 48 pha PHA +.394f51 ab plb PLB +.394f52 28 plp PLP +.394f53 68 pla PLA ; end setdbr macro +.394f54 48 pha PHA ; begin setdp macro +.394f55 08 php PHP +.394f56 c2 20 rep #$20 REP #$20 ; set A long +.394f58 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394f5b 5b tcd TCD +.394f5c 28 plp PLP +.394f5d 68 pla PLA ; end setdp macro +.394f5e c2 30 rep #$30 REP #$30 ; set A&X long +.394f60 a9 00 a5 lda #$a500 LDA #<>DOS_FAT_SECTORS ; Point to the first FAT sector in memory +.394f63 85 06 sta $0326 STA BIOS_BUFF_PTR +.394f65 a9 38 00 lda #$0038 LDA #`DOS_FAT_SECTORS +.394f68 85 08 sta $0328 STA BIOS_BUFF_PTR+2 +.394f6a a5 24 lda $0344 LDA DOS_FAT_LBA ; Set the LBA to that of the first sector's +.394f6c 85 02 sta $0322 STA BIOS_LBA +.394f6e a5 26 lda $0346 LDA DOS_FAT_LBA+2 +.394f70 85 04 sta $0324 STA BIOS_LBA+2 +.394f72 22 24 10 00 jsl $001024 JSL PUTBLOCK ; Write the first sector back to the block device +.394f76 90 14 bcc $394f8c BCC done +.394f78 a9 00 a7 lda #$a700 LDA #<>(DOS_FAT_SECTORS+DOS_SECTOR_SIZE) +.394f7b 85 06 sta $0326 STA BIOS_BUFF_PTR +.394f7d a9 38 00 lda #$0038 LDA #`(DOS_FAT_SECTORS+DOS_SECTOR_SIZE) +.394f80 85 08 sta $0328 STA BIOS_BUFF_PTR+2 +.394f82 e6 02 inc $0322 INC BIOS_LBA ; Point to the next sector in the FAT +.394f84 d0 02 bne $394f88 BNE put_second +.394f86 e6 04 inc $0324 INC BIOS_LBA+2 +.394f88 22 24 10 00 jsl $001024 put_second JSL PUTBLOCK ; Write the second sector back to the block device +.394f8c 2b pld done PLD +.394f8d ab plb PLB +.394f8e 6b rtl RTL +.394f8f DELCLUSTER12 +.394f8f 8b phb PHB +.394f90 0b phd PHD +.394f91 08 php PHP +.394f92 48 pha PHA ; begin setdbr macro +.394f93 08 php PHP +.394f94 e2 20 sep #$20 SEP #$20 ; set A short +.394f96 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.394f98 48 pha PHA +.394f99 ab plb PLB +.394f9a 28 plp PLP +.394f9b 68 pla PLA ; end setdbr macro +.394f9c 48 pha PHA ; begin setdp macro +.394f9d 08 php PHP +.394f9e c2 20 rep #$20 REP #$20 ; set A long +.394fa0 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394fa3 5b tcd TCD +.394fa4 28 plp PLP +.394fa5 68 pla PLA ; end setdp macro +.394fa6 c2 30 rep #$30 REP #$30 ; set A&X long +.394fa8 22 29 4b 39 jsl $394b29 JSL FATFORCLUSTER12 +.394fac 8a txa TXA ; Check to see if the index is odd or even +.394fad 89 01 00 bit #$0001 BIT #1 +.394fb0 d0 08 bne $394fba BNE is_odd +.394fb2 bd 00 a5 lda $38a500,x is_even LDA DOS_FAT_SECTORS,X ; Get the two bytes from the FAT +.394fb5 29 00 f0 and #$f000 AND #$F000 ; Mask out the lower 12 bits +.394fb8 80 06 bra $394fc0 BRA save_update +.394fba bd 00 a5 lda $38a500,x is_odd LDA DOS_FAT_SECTORS,X ; Get the two bytes from the FAT +.394fbd 29 0f 00 and #$000f AND #$000F ; Mask out the upper 12 bits +.394fc0 9d 00 a5 sta $38a500,x save_update STA DOS_FAT_SECTORS,X ; And write it back +.394fc3 22 48 4f 39 jsl $394f48 JSL WRITEFAT12 ; Write the two FAT12 sectors back to the drive +.394fc7 b0 0b bcs $394fd4 BCS ret_success +.394fc9 ret_failure +.394fc9 e2 20 sep #$20 SEP #$20 ; set A short +.394fcb a9 06 lda #$06 LDA #DOS_ERR_FAT +.394fcd 85 0e sta $032e STA DOS_STATUS +.394fcf 28 plp PLP +.394fd0 2b pld PLD +.394fd1 ab plb PLB +.394fd2 18 clc CLC +.394fd3 6b rtl RTL +.394fd4 ret_success +.394fd4 e2 20 sep #$20 SEP #$20 ; set A short +.394fd6 64 0e stz $032e STZ DOS_STATUS +.394fd8 28 plp PLP +.394fd9 2b pld PLD +.394fda ab plb PLB +.394fdb 38 sec SEC +.394fdc 6b rtl RTL +.394fdd DELCLUSTER32 +.394fdd 8b phb PHB +.394fde 0b phd PHD +.394fdf 08 php PHP +.394fe0 c2 30 rep #$30 REP #$30 ; set A&X long +.394fe2 48 pha PHA ; begin setdbr macro +.394fe3 08 php PHP +.394fe4 e2 20 sep #$20 SEP #$20 ; set A short +.394fe6 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.394fe8 48 pha PHA +.394fe9 ab plb PLB +.394fea 28 plp PLP +.394feb 68 pla PLA ; end setdbr macro +.394fec 48 pha PHA ; begin setdp macro +.394fed 08 php PHP +.394fee c2 20 rep #$20 REP #$20 ; set A long +.394ff0 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.394ff3 5b tcd TCD +.394ff4 28 plp PLP +.394ff5 68 pla PLA ; end setdp macro +.394ff6 22 91 4b 39 jsl $394b91 JSL FATFORCLUSTER32 +.394ffa a9 00 00 lda #$0000 LDA #0 +.394ffd 9d 00 a5 sta $38a500,x STA DOS_FAT_SECTORS,X ; Set the cluster entry to 0 +.395000 9d 02 a5 sta $38a502,x STA DOS_FAT_SECTORS+2,X +.395003 22 24 10 00 jsl $001024 JSL PUTBLOCK ; Write the sector back to the block device +.395007 b0 0b bcs $395014 BCS ret_success +.395009 ret_failure +.395009 e2 20 sep #$20 SEP #$20 ; set A short +.39500b a9 06 lda #$06 LDA #DOS_ERR_FAT +.39500d 85 0e sta $032e STA DOS_STATUS +.39500f 28 plp PLP +.395010 2b pld PLD +.395011 ab plb PLB +.395012 18 clc CLC +.395013 6b rtl RTL +.395014 ret_success +.395014 e2 20 sep #$20 SEP #$20 ; set A short +.395016 64 0e stz $032e STZ DOS_STATUS +.395018 28 plp PLP +.395019 2b pld PLD +.39501a ab plb PLB +.39501b 38 sec SEC +.39501c 6b rtl RTL +.39501d DOS_APPENDCLUS +.39501d 8b phb PHB +.39501e 0b phd PHD +.39501f 08 php PHP +.395020 48 pha PHA ; begin setdbr macro +.395021 08 php PHP +.395022 e2 20 sep #$20 SEP #$20 ; set A short +.395024 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.395026 48 pha PHA +.395027 ab plb PLB +.395028 28 plp PLP +.395029 68 pla PLA ; end setdbr macro +.39502a 48 pha PHA ; begin setdp macro +.39502b 08 php PHP +.39502c c2 20 rep #$20 REP #$20 ; set A long +.39502e a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395031 5b tcd TCD +.395032 28 plp PLP +.395033 68 pla PLA ; end setdp macro +.395034 c2 30 rep #$30 REP #$30 ; set A&X long +.395036 a5 12 lda $0332 LDA DOS_CLUS_ID+2 ; Save the cluster number for later +.395038 48 pha PHA +.395039 a5 10 lda $0330 LDA DOS_CLUS_ID +.39503b 48 pha PHA +.39503c 22 15 4d 39 jsl $394d15 JSL DOS_FREECLUS ; Find a free cluster on the block device +.395040 b0 09 bcs $39504b BCS save_cluster ; If we got a cluster, write the data to it +.395042 68 pla fail_cleanup PLA ; Restore the cluster of the file +.395043 85 10 sta $0330 STA DOS_CLUS_ID +.395045 68 pla PLA +.395046 85 12 sta $0332 STA DOS_CLUS_ID+2 +.395048 82 7d 00 brl $3950c8 BRL pass_failure ; Pass the failure back up the chain +.39504b a5 10 lda $0330 save_cluster LDA DOS_CLUS_ID +.39504d 8d 36 a0 sta $38a036 STA DOS_NEW_CLUSTER +.395050 a5 12 lda $0332 LDA DOS_CLUS_ID+2 +.395052 8d 38 a0 sta $38a038 STA DOS_NEW_CLUSTER+2 +.395055 22 29 48 39 jsl $394829 JSL DOS_PUTCLUSTER ; Write the data to the free cluster +.395059 90 e7 bcc $395042 BCC fail_cleanup ; If failure: clean up stack and pass the failure up +.39505b 68 pla PLA ; Restore the cluster of the file +.39505c 85 10 sta $0330 STA DOS_CLUS_ID +.39505e 68 pla PLA +.39505f 85 12 sta $0332 STA DOS_CLUS_ID+2 +.395061 22 fc 4b 39 jsl $394bfc walk_loop JSL NEXTCLUSTER ; Try to get the next cluster in the chain +.395065 b0 fa bcs $395061 BCS walk_loop ; If found a cluster, keep walking the chain +.395067 e2 20 sep #$20 SEP #$20 ; set A short +.395069 af 01 a0 38 lda $38a001 LDA @l FILE_SYSTEM ; Get the file system code +.39506d c9 00 cmp #$00 CMP #PART_TYPE_FAT12 ; Is it FAT12? +.39506f d0 3d bne $3950ae BNE fat32 ; No: assume it's FAT32 +.395071 fat12 +.395071 c2 20 rep #$20 REP #$20 ; set A long +.395073 22 b6 4a 39 jsl $394ab6 JSL ENTRYFORCLUS12 ; Make sure we have the right offset for the cluster +.395077 a5 10 lda $0330 LDA DOS_CLUS_ID ; Check to see if the last cluster ID is even or odd +.395079 89 01 00 bit #$0001 BIT #1 +.39507c d0 11 bne $39508f BNE is_odd +.39507e ad 36 a0 lda $38a036 is_even LDA DOS_NEW_CLUSTER ; Handle the even case (change the lower 12 bits) +.395081 29 ff 0f and #$0fff AND #$0FFF +.395084 8d 36 a0 sta $38a036 STA DOS_NEW_CLUSTER +.395087 bd 00 a5 lda $38a500,x LDA DOS_FAT_SECTORS,X +.39508a 29 00 f0 and #$f000 AND #$F000 +.39508d 80 10 bra $39509f BRA update_fat12 +.39508f ad 36 a0 lda $38a036 is_odd LDA DOS_NEW_CLUSTER ; Handle the odd case (change the upper 12 bits) +.395092 0a asl a ASL A +.395093 0a asl a ASL A +.395094 0a asl a ASL A +.395095 0a asl a ASL A +.395096 8d 36 a0 sta $38a036 STA DOS_NEW_CLUSTER +.395099 bd 00 a5 lda $38a500,x LDA DOS_FAT_SECTORS,X +.39509c 29 0f 00 and #$000f AND #$000F +.39509f 0d 36 a0 ora $38a036 update_fat12 ORA DOS_NEW_CLUSTER +.3950a2 9d 00 a5 sta $38a500,x STA DOS_FAT_SECTORS,X +.3950a5 22 48 4f 39 jsl $394f48 JSL WRITEFAT12 ; Write the two FAT12 sectors back to the drive +.3950a9 b0 22 bcs $3950cd BCS ret_success +.3950ab 82 1a 00 brl $3950c8 BRL pass_failure +.3950ae fat32 +.3950ae c2 20 rep #$20 REP #$20 ; set A long +.3950b0 ad 36 a0 lda $38a036 LDA DOS_NEW_CLUSTER ; Write the ID of the new cluster to the end of the chain +.3950b3 9d 00 a5 sta $38a500,x STA DOS_FAT_SECTORS,X +.3950b6 ad 38 a0 lda $38a038 LDA DOS_NEW_CLUSTER+2 +.3950b9 9d 02 a5 sta $38a502,x STA DOS_FAT_SECTORS+2,X +.3950bc 22 24 10 00 jsl $001024 JSL PUTBLOCK ; Write the FAT sector back (assumes BIOS_LBA and BIOS_BUFF_PTR haven't changed) +.3950c0 b0 0b bcs $3950cd BCS ret_success +.3950c2 e2 20 sep #$20 SEP #$20 ; set A short +.3950c4 a9 06 lda #$06 LDA #DOS_ERR_FAT ; Problem working with the FAT +.3950c6 85 0e sta $032e STA DOS_STATUS +.3950c8 28 plp pass_failure PLP +.3950c9 2b pld PLD +.3950ca ab plb PLB +.3950cb 18 clc CLC +.3950cc 6b rtl RTL +.3950cd ret_success +.3950cd e2 20 sep #$20 SEP #$20 ; set A short +.3950cf 64 0e stz $032e STZ DOS_STATUS +.3950d1 28 plp PLP +.3950d2 2b pld PLD +.3950d3 ab plb PLB +.3950d4 38 sec SEC +.3950d5 6b rtl RTL +.3950d6 BCD2BIN +.3950d6 8b phb PHB +.3950d7 0b phd PHD +.3950d8 08 php PHP +.3950d9 48 pha PHA ; begin setdbr macro +.3950da 08 php PHP +.3950db e2 20 sep #$20 SEP #$20 ; set A short +.3950dd a9 00 lda #$00 LDA #0 +.3950df 48 pha PHA +.3950e0 ab plb PLB +.3950e1 28 plp PLP +.3950e2 68 pla PLA ; end setdbr macro +.3950e3 48 pha PHA ; begin setdp macro +.3950e4 08 php PHP +.3950e5 c2 20 rep #$20 REP #$20 ; set A long +.3950e7 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.3950ea 5b tcd TCD +.3950eb 28 plp PLP +.3950ec 68 pla PLA ; end setdp macro +.3950ed c2 30 rep #$30 REP #$30 ; set A&X long +.3950ef 85 28 sta $0348 STA DOS_TEMP +.3950f1 29 0f 00 and #$000f AND #$000F +.3950f4 85 2a sta $034a STA DOS_TEMP+2 +.3950f6 a5 28 lda $0348 LDA DOS_TEMP +.3950f8 4a lsr a LSR A +.3950f9 4a lsr a LSR A +.3950fa 4a lsr a LSR A +.3950fb 4a lsr a LSR A +.3950fc 85 28 sta $0348 STA DOS_TEMP +.3950fe 29 0f 00 and #$000f AND #$000F +.395101 8f 00 01 00 sta $000100 STA @l UNSIGNED_MULT_A_LO +.395105 a9 0a 00 lda #$000a LDA #10 +.395108 8f 02 01 00 sta $000102 STA @l UNSIGNED_MULT_B_LO +.39510c af 04 01 00 lda $000104 LDA @l UNSIGNED_MULT_AL_LO +.395110 18 clc CLC +.395111 65 2a adc $034a ADC DOS_TEMP+2 +.395113 85 2a sta $034a STA DOS_TEMP+2 +.395115 a5 28 lda $0348 LDA DOS_TEMP +.395117 4a lsr a LSR A +.395118 4a lsr a LSR A +.395119 4a lsr a LSR A +.39511a 4a lsr a LSR A +.39511b 85 28 sta $0348 STA DOS_TEMP +.39511d 29 0f 00 and #$000f AND #$000F +.395120 8f 00 01 00 sta $000100 STA @l UNSIGNED_MULT_A_LO +.395124 a9 64 00 lda #$0064 LDA #100 +.395127 8f 02 01 00 sta $000102 STA @l UNSIGNED_MULT_B_LO +.39512b af 04 01 00 lda $000104 LDA @l UNSIGNED_MULT_AL_LO +.39512f 18 clc CLC +.395130 65 2a adc $034a ADC DOS_TEMP+2 +.395132 85 2a sta $034a STA DOS_TEMP+2 +.395134 a5 28 lda $0348 LDA DOS_TEMP +.395136 4a lsr a LSR A +.395137 4a lsr a LSR A +.395138 4a lsr a LSR A +.395139 4a lsr a LSR A +.39513a 29 0f 00 and #$000f AND #$000F +.39513d 8f 00 01 00 sta $000100 STA @l UNSIGNED_MULT_A_LO +.395141 a9 e8 03 lda #$03e8 LDA #1000 +.395144 8f 02 01 00 sta $000102 STA @l UNSIGNED_MULT_B_LO +.395148 af 04 01 00 lda $000104 LDA @l UNSIGNED_MULT_AL_LO +.39514c 18 clc CLC +.39514d 65 2a adc $034a ADC DOS_TEMP+2 +.39514f 28 plp PLP +.395150 2b pld PLD +.395151 ab plb PLB +.395152 6b rtl RTL +.395153 DOS_RTCCREATE +.395153 8b phb PHB +.395154 0b phd PHD +.395155 08 php PHP +.395156 48 pha PHA ; begin setdbr macro +.395157 08 php PHP +.395158 e2 20 sep #$20 SEP #$20 ; set A short +.39515a a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.39515c 48 pha PHA +.39515d ab plb PLB +.39515e 28 plp PLP +.39515f 68 pla PLA ; end setdbr macro +.395160 48 pha PHA ; begin setdp macro +.395161 08 php PHP +.395162 c2 20 rep #$20 REP #$20 ; set A long +.395164 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395167 5b tcd TCD +.395168 28 plp PLP +.395169 68 pla PLA ; end setdp macro +.39516a c2 10 rep #$10 REP #$10 ; set X long +.39516c e2 20 sep #$20 SEP #$20 ; set A short +.39516e af 0e 08 af lda $af080e LDA @l RTC_CTRL ; Turn off the updates to the clock +.395172 09 08 ora #$08 ORA #%00001000 +.395174 8f 0e 08 af sta $af080e STA @l RTC_CTRL +.395178 af 0f 08 af lda $af080f LDA @l RTC_CENTURY +.39517c 85 29 sta $0349 STA DOS_TEMP+1 +.39517e af 0a 08 af lda $af080a LDA @l RTC_YEAR ; Get the year +.395182 85 28 sta $0348 STA DOS_TEMP +.395184 c2 20 rep #$20 REP #$20 ; set A long +.395186 a5 28 lda $0348 LDA DOS_TEMP +.395188 22 d6 50 39 jsl $3950d6 JSL BCD2BIN ; Convert it to binary +.39518c 85 28 sta $0348 STA DOS_TEMP +.39518e 38 sec SEC ; Year is relative to 1980 +.39518f e9 bc 07 sbc #$07bc SBC #1980 +.395192 c2 20 rep #$20 REP #$20 ; set A long .395194 0a asl a ASL A .395195 0a asl a ASL A .395196 0a asl a ASL A .395197 0a asl a ASL A -.395198 29 00 fe and #$fe00 AND #$FE00 -.39519b a0 16 00 ldy #$0016 LDY #FILEDESC.CREATE_DATE ; And save it to the creation date field -.39519e 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.3951a0 e2 20 sep #$20 SEP #$20 ; set A short -.3951a2 af 09 08 af lda $af0809 LDA @l RTC_MONTH ; Get the month -.3951a6 c2 20 rep #$20 REP #$20 ; set A long -.3951a8 29 ff 00 and #$00ff AND #$00FF -.3951ab 22 d1 50 39 jsl $3950d1 JSL BCD2BIN ; Convert it to binary -.3951af 29 ff 00 and #$00ff AND #$00FF ; Move the year to bits 15 - 9 -.3951b2 0a asl a ASL A -.3951b3 0a asl a ASL A -.3951b4 0a asl a ASL A -.3951b5 0a asl a ASL A -.3951b6 0a asl a ASL A -.3951b7 29 e0 01 and #$01e0 AND #$01E0 ; Make sure only the month is covered -.3951ba a0 16 00 ldy #$0016 LDY #FILEDESC.CREATE_DATE ; And save it to the creation date field -.3951bd 17 20 ora [$0340],y ORA [DOS_FD_PTR],Y -.3951bf 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.3951c1 e2 20 sep #$20 SEP #$20 ; set A short -.3951c3 af 06 08 af lda $af0806 LDA @l RTC_DAY ; Get the day -.3951c7 c2 20 rep #$20 REP #$20 ; set A long -.3951c9 29 ff 00 and #$00ff AND #$00FF -.3951cc 22 d1 50 39 jsl $3950d1 JSL BCD2BIN ; Convert it to binary -.3951d0 29 1f 00 and #$001f AND #$001F ; Make sure only the day is covered -.3951d3 a0 16 00 ldy #$0016 LDY #FILEDESC.CREATE_DATE ; And save it to the creation date field -.3951d6 17 20 ora [$0340],y ORA [DOS_FD_PTR],Y -.3951d8 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.3951da e2 20 sep #$20 SEP #$20 ; set A short -.3951dc af 04 08 af lda $af0804 LDA @l RTC_HRS ; Get the hour -.3951e0 29 1f and #$1f AND #$1F ; Trim AM/PM bit -.3951e2 c2 20 rep #$20 REP #$20 ; set A long -.3951e4 29 ff 00 and #$00ff AND #$00FF -.3951e7 22 d1 50 39 jsl $3950d1 JSL BCD2BIN ; Convert it to binary -.3951eb c2 20 rep #$20 REP #$20 ; set A long -.3951ed 0a asl a ASL A -.3951ee 0a asl a ASL A -.3951ef 0a asl a ASL A -.3951f0 0a asl a ASL A -.3951f1 0a asl a ASL A +.395198 0a asl a ASL A +.395199 0a asl a ASL A +.39519a 0a asl a ASL A +.39519b 0a asl a ASL A +.39519c 0a asl a ASL A +.39519d 29 00 fe and #$fe00 AND #$FE00 +.3951a0 a0 16 00 ldy #$0016 LDY #FILEDESC.CREATE_DATE ; And save it to the creation date field +.3951a3 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3951a5 e2 20 sep #$20 SEP #$20 ; set A short +.3951a7 af 09 08 af lda $af0809 LDA @l RTC_MONTH ; Get the month +.3951ab c2 20 rep #$20 REP #$20 ; set A long +.3951ad 29 ff 00 and #$00ff AND #$00FF +.3951b0 22 d6 50 39 jsl $3950d6 JSL BCD2BIN ; Convert it to binary +.3951b4 29 ff 00 and #$00ff AND #$00FF ; Move the year to bits 15 - 9 +.3951b7 0a asl a ASL A +.3951b8 0a asl a ASL A +.3951b9 0a asl a ASL A +.3951ba 0a asl a ASL A +.3951bb 0a asl a ASL A +.3951bc 29 e0 01 and #$01e0 AND #$01E0 ; Make sure only the month is covered +.3951bf a0 16 00 ldy #$0016 LDY #FILEDESC.CREATE_DATE ; And save it to the creation date field +.3951c2 17 20 ora [$0340],y ORA [DOS_FD_PTR],Y +.3951c4 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3951c6 e2 20 sep #$20 SEP #$20 ; set A short +.3951c8 af 06 08 af lda $af0806 LDA @l RTC_DAY ; Get the day +.3951cc c2 20 rep #$20 REP #$20 ; set A long +.3951ce 29 ff 00 and #$00ff AND #$00FF +.3951d1 22 d6 50 39 jsl $3950d6 JSL BCD2BIN ; Convert it to binary +.3951d5 29 1f 00 and #$001f AND #$001F ; Make sure only the day is covered +.3951d8 a0 16 00 ldy #$0016 LDY #FILEDESC.CREATE_DATE ; And save it to the creation date field +.3951db 17 20 ora [$0340],y ORA [DOS_FD_PTR],Y +.3951dd 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3951df e2 20 sep #$20 SEP #$20 ; set A short +.3951e1 af 04 08 af lda $af0804 LDA @l RTC_HRS ; Get the hour +.3951e5 29 1f and #$1f AND #$1F ; Trim AM/PM bit +.3951e7 c2 20 rep #$20 REP #$20 ; set A long +.3951e9 29 ff 00 and #$00ff AND #$00FF +.3951ec 22 d6 50 39 jsl $3950d6 JSL BCD2BIN ; Convert it to binary +.3951f0 c2 20 rep #$20 REP #$20 ; set A long .3951f2 0a asl a ASL A .3951f3 0a asl a ASL A .3951f4 0a asl a ASL A .3951f5 0a asl a ASL A .3951f6 0a asl a ASL A .3951f7 0a asl a ASL A -.3951f8 29 00 f8 and #$f800 AND #$F800 -.3951fb a0 18 00 ldy #$0018 LDY #FILEDESC.CREATE_TIME ; And save it to the creation time field -.3951fe 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.395200 e2 20 sep #$20 SEP #$20 ; set A short -.395202 af 02 08 af lda $af0802 LDA @l RTC_MIN ; Get the minute -.395206 c2 20 rep #$20 REP #$20 ; set A long -.395208 29 ff 00 and #$00ff AND #$00FF -.39520b 22 d1 50 39 jsl $3950d1 JSL BCD2BIN ; Convert it to binary -.39520f c2 20 rep #$20 REP #$20 ; set A long -.395211 0a asl a ASL A -.395212 0a asl a ASL A -.395213 0a asl a ASL A -.395214 0a asl a ASL A -.395215 0a asl a ASL A -.395216 29 e0 07 and #$07e0 AND #$07E0 -.395219 a0 18 00 ldy #$0018 LDY #FILEDESC.CREATE_TIME ; And save it to the creation time field -.39521c 17 20 ora [$0340],y ORA [DOS_FD_PTR],Y -.39521e 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.395220 e2 20 sep #$20 SEP #$20 ; set A short -.395222 af 00 08 af lda $af0800 LDA @l RTC_SEC ; Get the second -.395226 c2 20 rep #$20 REP #$20 ; set A long -.395228 29 ff 00 and #$00ff AND #$00FF -.39522b 22 d1 50 39 jsl $3950d1 JSL BCD2BIN ; Convert it to binary -.39522f c2 20 rep #$20 REP #$20 ; set A long -.395231 29 1f 00 and #$001f AND #$001F -.395234 a0 18 00 ldy #$0018 LDY #FILEDESC.CREATE_TIME ; And save it to the creation time field -.395237 17 20 ora [$0340],y ORA [DOS_FD_PTR],Y -.395239 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.39523b af 0e 08 af lda $af080e LDA @l RTC_CTRL ; Turn on the updates again -.39523f 29 f7 00 and #$00f7 AND #%11110111 -.395242 8f 0e 08 af sta $af080e STA @l RTC_CTRL -.395246 28 plp PLP -.395247 2b pld PLD -.395248 ab plb PLB -.395249 6b rtl RTL -.39524a DOS_CREATE -.39524a 8b phb PHB -.39524b 0b phd PHD -.39524c 08 php PHP -.39524d 48 pha PHA ; begin setdbr macro -.39524e 08 php PHP -.39524f e2 20 sep #$20 SEP #$20 ; set A short -.395251 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.395253 48 pha PHA -.395254 ab plb PLB -.395255 28 plp PLP -.395256 68 pla PLA ; end setdbr macro -.395257 48 pha PHA ; begin setdp macro -.395258 08 php PHP -.395259 c2 20 rep #$20 REP #$20 ; set A long -.39525b a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.39525e 5b tcd TCD -.39525f 28 plp PLP -.395260 68 pla PLA ; end setdp macro -.395261 c2 30 rep #$30 REP #$30 ; set A&X long -.395263 a0 02 00 ldy #$0002 LDY #FILEDESC.PATH ; DOS_TEMP := DOS_FD_PTR->PATH -.395266 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395268 85 28 sta $0348 STA DOS_TEMP -.39526a c8 iny INY -.39526b c8 iny INY -.39526c b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.39526e 85 2a sta $034a STA DOS_TEMP+2 -.395270 e2 20 sep #$20 SEP #$20 ; set A short -.395272 a0 00 00 ldy #$0000 LDY #0 -.395275 a2 00 00 ldx #$0000 LDX #0 -.395278 b7 28 lda [$0348],y path_loop LDA [DOS_TEMP],Y ; Get a byte of the path -.39527a 95 e0 sta $0400,x STA DOS_PATH_BUFF,X ; ... save it to the path buffer -.39527c f0 04 beq $395282 BEQ find_file ; If it's NULL, we're done -.39527e e8 inx INX -.39527f c8 iny INY -.395280 80 f6 bra $395278 BRA path_loop -.395282 22 3a 49 39 jsl $39493a find_file JSL DOS_PARSE_PATH -.395286 22 d2 49 39 jsl $3949d2 JSL DOS_FINDFILE -.39528a 90 07 bcc $395293 BCC set_device -.39528c e2 20 sep #$20 SEP #$20 ; set A short -.39528e a9 0b lda #$0b LDA #DOS_ERR_FILEEXISTS -.395290 82 d2 00 brl $395365 BRL ret_failure -.395293 set_device -.395293 e2 20 sep #$20 SEP #$20 ; set A short -.395295 a0 01 00 ldy #$0001 LDY #FILEDESC.DEV ; Set the device in the file descriptor -.395298 a5 01 lda $0321 LDA BIOS_DEV -.39529a 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.39529c validate_name -.39529c 22 10 4d 39 jsl $394d10 JSL DOS_FREECLUS -.3952a0 b0 03 bcs $3952a5 BCS save_data -.3952a2 82 c4 00 brl $395369 BRL pass_failure -.3952a5 save_data -.3952a5 c2 20 rep #$20 REP #$20 ; set A long -.3952a7 a0 0a 00 ldy #$000a LDY #FILEDESC.FIRST_CLUSTER -.3952aa a5 10 lda $0330 LDA DOS_CLUS_ID ; DOS_FD_PTR->FIRST_CLUSTER := DOS_CLUS_ID -.3952ac 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.3952ae c8 iny INY -.3952af c8 iny INY -.3952b0 a5 12 lda $0332 LDA DOS_CLUS_ID+2 -.3952b2 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.3952b4 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER ; DOS_BUFF_PTR := DOS_FD_PTR->BUFFER -.3952b7 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3952b9 85 1c sta $033c STA DOS_BUFF_PTR -.3952bb c8 iny INY -.3952bc c8 iny INY -.3952bd b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3952bf 85 1e sta $033e STA DOS_BUFF_PTR+2 -.3952c1 22 29 48 39 jsl $394829 JSL DOS_PUTCLUSTER -.3952c5 b0 00 bcs $3952c7 BCS find_dir -.3952c7 find_dir -.3952c7 c2 20 rep #$20 REP #$20 ; set A long -.3952c9 22 64 43 39 jsl $394364 JSL DOS_DIRFINDFREE -.3952cd b0 1a bcs $3952e9 BCS set_entry -.3952cf c2 20 rep #$20 REP #$20 ; set A long -.3952d1 a0 0a 00 ldy #$000a LDY #FILEDESC.FIRST_CLUSTER ; Failed to get the directory entry... -.3952d4 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y ; DOS_CLUS_ID := DOS_FD_PTR->FIRST_CLUSTER -.3952d6 85 10 sta $0330 STA DOS_CLUS_ID -.3952d8 c8 iny INY -.3952d9 c8 iny INY -.3952da b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3952dc 85 12 sta $0332 STA DOS_CLUS_ID+2 -.3952de 22 d8 4f 39 jsl $394fd8 JSL DELCLUSTER32 ; Delete the cluster -.3952e2 e2 20 sep #$20 SEP #$20 ; set A short -.3952e4 a9 08 lda #$08 LDA #DOS_ERR_NODIR ; Return that we couldn't read the directory -.3952e6 82 7c 00 brl $395365 BRL ret_failure -.3952e9 set_entry -.3952e9 e2 20 sep #$20 SEP #$20 ; set A short -.3952eb a0 00 00 ldy #$0000 LDY #0 -.3952ee a9 00 lda #$00 LDA #0 ; NULL -.3952f0 97 18 sta [$0338],y copy_dir_loop STA [DOS_DIR_PTR],Y ; Save it to the directory cluster -.3952f2 c8 iny INY -.3952f3 c0 20 00 cpy #$0020 CPY #SIZE(DIRENTRY) -.3952f6 d0 f8 bne $3952f0 BNE copy_dir_loop -.3952f8 a0 00 00 ldy #$0000 LDY #0 -.3952fb b9 3a a0 lda $38a03a,y name_loop LDA DOS_SHORT_NAME,Y ; Copy the name over -.3952fe 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y -.395300 c8 iny INY -.395301 c0 0b 00 cpy #$000b CPY #11 -.395304 d0 f5 bne $3952fb BNE name_loop -.395306 c2 20 rep #$20 REP #$20 ; set A long -.395308 a0 0a 00 ldy #$000a LDY #FILEDESC.FIRST_CLUSTER ; DOS_DIR_PTR->CLUSTER_L := DOS_FD_PTR->FIRST_CLUSTER[15..0] -.39530b b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.39530d a0 1a 00 ldy #$001a LDY #DIRENTRY.CLUSTER_L -.395310 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y -.395312 a0 0c 00 ldy #$000c LDY #FILEDESC.FIRST_CLUSTER+2 ; DOS_DIR_PTR->CLUSTER_H := DOS_FD_PTR->FIRST_CLUSTER[31..16] -.395315 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395317 a0 14 00 ldy #$0014 LDY #DIRENTRY.CLUSTER_H -.39531a 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y -.39531c a0 12 00 ldy #$0012 LDY #FILEDESC.SIZE ; DOS_DIR_PTR->SIZE := DOS_FD_PTR->SIZE -.39531f b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395321 a0 1c 00 ldy #$001c LDY #DIRENTRY.SIZE -.395324 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y -.395326 a0 14 00 ldy #$0014 LDY #FILEDESC.SIZE+2 -.395329 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.39532b a0 1e 00 ldy #$001e LDY #DIRENTRY.SIZE+2 -.39532e 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y -.395330 a9 00 00 lda #$0000 LDA #0 ; Force create date-time to 0 -.395333 a0 16 00 ldy #$0016 LDY #FILEDESC.CREATE_DATE ; TODO: restore the RTC integration when that is working better. -.395336 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.395338 a0 18 00 ldy #$0018 LDY #FILEDESC.CREATE_TIME +.3951f8 0a asl a ASL A +.3951f9 0a asl a ASL A +.3951fa 0a asl a ASL A +.3951fb 0a asl a ASL A +.3951fc 0a asl a ASL A +.3951fd 29 00 f8 and #$f800 AND #$F800 +.395200 a0 18 00 ldy #$0018 LDY #FILEDESC.CREATE_TIME ; And save it to the creation time field +.395203 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395205 e2 20 sep #$20 SEP #$20 ; set A short +.395207 af 02 08 af lda $af0802 LDA @l RTC_MIN ; Get the minute +.39520b c2 20 rep #$20 REP #$20 ; set A long +.39520d 29 ff 00 and #$00ff AND #$00FF +.395210 22 d6 50 39 jsl $3950d6 JSL BCD2BIN ; Convert it to binary +.395214 c2 20 rep #$20 REP #$20 ; set A long +.395216 0a asl a ASL A +.395217 0a asl a ASL A +.395218 0a asl a ASL A +.395219 0a asl a ASL A +.39521a 0a asl a ASL A +.39521b 29 e0 07 and #$07e0 AND #$07E0 +.39521e a0 18 00 ldy #$0018 LDY #FILEDESC.CREATE_TIME ; And save it to the creation time field +.395221 17 20 ora [$0340],y ORA [DOS_FD_PTR],Y +.395223 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395225 e2 20 sep #$20 SEP #$20 ; set A short +.395227 af 00 08 af lda $af0800 LDA @l RTC_SEC ; Get the second +.39522b c2 20 rep #$20 REP #$20 ; set A long +.39522d 29 ff 00 and #$00ff AND #$00FF +.395230 22 d6 50 39 jsl $3950d6 JSL BCD2BIN ; Convert it to binary +.395234 c2 20 rep #$20 REP #$20 ; set A long +.395236 29 1f 00 and #$001f AND #$001F +.395239 a0 18 00 ldy #$0018 LDY #FILEDESC.CREATE_TIME ; And save it to the creation time field +.39523c 17 20 ora [$0340],y ORA [DOS_FD_PTR],Y +.39523e 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395240 af 0e 08 af lda $af080e LDA @l RTC_CTRL ; Turn on the updates again +.395244 29 f7 00 and #$00f7 AND #%11110111 +.395247 8f 0e 08 af sta $af080e STA @l RTC_CTRL +.39524b 28 plp PLP +.39524c 2b pld PLD +.39524d ab plb PLB +.39524e 6b rtl RTL +.39524f DOS_CREATE +.39524f 8b phb PHB +.395250 0b phd PHD +.395251 08 php PHP +.395252 48 pha PHA ; begin setdbr macro +.395253 08 php PHP +.395254 e2 20 sep #$20 SEP #$20 ; set A short +.395256 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.395258 48 pha PHA +.395259 ab plb PLB +.39525a 28 plp PLP +.39525b 68 pla PLA ; end setdbr macro +.39525c 48 pha PHA ; begin setdp macro +.39525d 08 php PHP +.39525e c2 20 rep #$20 REP #$20 ; set A long +.395260 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395263 5b tcd TCD +.395264 28 plp PLP +.395265 68 pla PLA ; end setdp macro +.395266 c2 30 rep #$30 REP #$30 ; set A&X long +.395268 a0 02 00 ldy #$0002 LDY #FILEDESC.PATH ; DOS_TEMP := DOS_FD_PTR->PATH +.39526b b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.39526d 85 28 sta $0348 STA DOS_TEMP +.39526f c8 iny INY +.395270 c8 iny INY +.395271 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395273 85 2a sta $034a STA DOS_TEMP+2 +.395275 e2 20 sep #$20 SEP #$20 ; set A short +.395277 a0 00 00 ldy #$0000 LDY #0 +.39527a a2 00 00 ldx #$0000 LDX #0 +.39527d b7 28 lda [$0348],y path_loop LDA [DOS_TEMP],Y ; Get a byte of the path +.39527f 95 e0 sta $0400,x STA DOS_PATH_BUFF,X ; ... save it to the path buffer +.395281 f0 04 beq $395287 BEQ find_file ; If it's NULL, we're done +.395283 e8 inx INX +.395284 c8 iny INY +.395285 80 f6 bra $39527d BRA path_loop +.395287 22 3a 49 39 jsl $39493a find_file JSL DOS_PARSE_PATH +.39528b 22 d2 49 39 jsl $3949d2 JSL DOS_FINDFILE +.39528f 90 07 bcc $395298 BCC set_device +.395291 e2 20 sep #$20 SEP #$20 ; set A short +.395293 a9 0b lda #$0b LDA #DOS_ERR_FILEEXISTS +.395295 82 d2 00 brl $39536a BRL ret_failure +.395298 set_device +.395298 e2 20 sep #$20 SEP #$20 ; set A short +.39529a a0 01 00 ldy #$0001 LDY #FILEDESC.DEV ; Set the device in the file descriptor +.39529d a5 01 lda $0321 LDA BIOS_DEV +.39529f 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3952a1 validate_name +.3952a1 22 15 4d 39 jsl $394d15 JSL DOS_FREECLUS +.3952a5 b0 03 bcs $3952aa BCS save_data +.3952a7 82 c4 00 brl $39536e BRL pass_failure +.3952aa save_data +.3952aa c2 20 rep #$20 REP #$20 ; set A long +.3952ac a0 0a 00 ldy #$000a LDY #FILEDESC.FIRST_CLUSTER +.3952af a5 10 lda $0330 LDA DOS_CLUS_ID ; DOS_FD_PTR->FIRST_CLUSTER := DOS_CLUS_ID +.3952b1 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3952b3 c8 iny INY +.3952b4 c8 iny INY +.3952b5 a5 12 lda $0332 LDA DOS_CLUS_ID+2 +.3952b7 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3952b9 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER ; DOS_BUFF_PTR := DOS_FD_PTR->BUFFER +.3952bc b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3952be 85 1c sta $033c STA DOS_BUFF_PTR +.3952c0 c8 iny INY +.3952c1 c8 iny INY +.3952c2 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3952c4 85 1e sta $033e STA DOS_BUFF_PTR+2 +.3952c6 22 29 48 39 jsl $394829 JSL DOS_PUTCLUSTER +.3952ca b0 00 bcs $3952cc BCS find_dir +.3952cc find_dir +.3952cc c2 20 rep #$20 REP #$20 ; set A long +.3952ce 22 64 43 39 jsl $394364 JSL DOS_DIRFINDFREE +.3952d2 b0 1a bcs $3952ee BCS set_entry +.3952d4 c2 20 rep #$20 REP #$20 ; set A long +.3952d6 a0 0a 00 ldy #$000a LDY #FILEDESC.FIRST_CLUSTER ; Failed to get the directory entry... +.3952d9 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y ; DOS_CLUS_ID := DOS_FD_PTR->FIRST_CLUSTER +.3952db 85 10 sta $0330 STA DOS_CLUS_ID +.3952dd c8 iny INY +.3952de c8 iny INY +.3952df b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3952e1 85 12 sta $0332 STA DOS_CLUS_ID+2 +.3952e3 22 dd 4f 39 jsl $394fdd JSL DELCLUSTER32 ; Delete the cluster +.3952e7 e2 20 sep #$20 SEP #$20 ; set A short +.3952e9 a9 08 lda #$08 LDA #DOS_ERR_NODIR ; Return that we couldn't read the directory +.3952eb 82 7c 00 brl $39536a BRL ret_failure +.3952ee set_entry +.3952ee e2 20 sep #$20 SEP #$20 ; set A short +.3952f0 a0 00 00 ldy #$0000 LDY #0 +.3952f3 a9 00 lda #$00 LDA #0 ; NULL +.3952f5 97 18 sta [$0338],y copy_dir_loop STA [DOS_DIR_PTR],Y ; Save it to the directory cluster +.3952f7 c8 iny INY +.3952f8 c0 20 00 cpy #$0020 CPY #SIZE(DIRENTRY) +.3952fb d0 f8 bne $3952f5 BNE copy_dir_loop +.3952fd a0 00 00 ldy #$0000 LDY #0 +.395300 b9 3a a0 lda $38a03a,y name_loop LDA DOS_SHORT_NAME,Y ; Copy the name over +.395303 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y +.395305 c8 iny INY +.395306 c0 0b 00 cpy #$000b CPY #11 +.395309 d0 f5 bne $395300 BNE name_loop +.39530b c2 20 rep #$20 REP #$20 ; set A long +.39530d a0 0a 00 ldy #$000a LDY #FILEDESC.FIRST_CLUSTER ; DOS_DIR_PTR->CLUSTER_L := DOS_FD_PTR->FIRST_CLUSTER[15..0] +.395310 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395312 a0 1a 00 ldy #$001a LDY #DIRENTRY.CLUSTER_L +.395315 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y +.395317 a0 0c 00 ldy #$000c LDY #FILEDESC.FIRST_CLUSTER+2 ; DOS_DIR_PTR->CLUSTER_H := DOS_FD_PTR->FIRST_CLUSTER[31..16] +.39531a b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.39531c a0 14 00 ldy #$0014 LDY #DIRENTRY.CLUSTER_H +.39531f 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y +.395321 a0 12 00 ldy #$0012 LDY #FILEDESC.SIZE ; DOS_DIR_PTR->SIZE := DOS_FD_PTR->SIZE +.395324 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395326 a0 1c 00 ldy #$001c LDY #DIRENTRY.SIZE +.395329 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y +.39532b a0 14 00 ldy #$0014 LDY #FILEDESC.SIZE+2 +.39532e b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395330 a0 1e 00 ldy #$001e LDY #DIRENTRY.SIZE+2 +.395333 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y +.395335 a9 00 00 lda #$0000 LDA #0 ; Force create date-time to 0 +.395338 a0 16 00 ldy #$0016 LDY #FILEDESC.CREATE_DATE ; TODO: restore the RTC integration when that is working better. .39533b 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.39533d a0 16 00 ldy #$0016 LDY #FILEDESC.CREATE_DATE ; DOS_DIR_PTR->CREATE_DATE := DOS_FD_PTR->CREATE_DATE -.395340 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395342 a0 10 00 ldy #$0010 LDY #DIRENTRY.CREATE_DATE -.395345 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y -.395347 a0 18 00 ldy #$0018 LDY #DIRENTRY.MODIFIED_DATE ; And DOS_DIR_PTR->MODIFIED_DATE +.39533d a0 18 00 ldy #$0018 LDY #FILEDESC.CREATE_TIME +.395340 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395342 a0 16 00 ldy #$0016 LDY #FILEDESC.CREATE_DATE ; DOS_DIR_PTR->CREATE_DATE := DOS_FD_PTR->CREATE_DATE +.395345 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395347 a0 10 00 ldy #$0010 LDY #DIRENTRY.CREATE_DATE .39534a 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y -.39534c a0 18 00 ldy #$0018 LDY #FILEDESC.CREATE_TIME ; DOS_DIR_PTR->CREATE_TIME := DOS_FD_PTR->CREATE_TIME -.39534f b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395351 a0 0e 00 ldy #$000e LDY #DIRENTRY.CREATE_TIME -.395354 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y -.395356 a0 16 00 ldy #$0016 LDY #DIRENTRY.MODIFIED_TIME ; And DOS_DIR_PTR->MODIFIED_TIME +.39534c a0 18 00 ldy #$0018 LDY #DIRENTRY.MODIFIED_DATE ; And DOS_DIR_PTR->MODIFIED_DATE +.39534f 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y +.395351 a0 18 00 ldy #$0018 LDY #FILEDESC.CREATE_TIME ; DOS_DIR_PTR->CREATE_TIME := DOS_FD_PTR->CREATE_TIME +.395354 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395356 a0 0e 00 ldy #$000e LDY #DIRENTRY.CREATE_TIME .395359 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y -.39535b c2 20 rep #$20 REP #$20 ; set A long -.39535d 22 22 44 39 jsl $394422 JSL DOS_DIRWRITE -.395361 b0 0b bcs $39536e BCS ret_success -.395363 80 04 bra $395369 BRA pass_failure -.395365 ret_failure -.395365 e2 20 sep #$20 SEP #$20 ; set A short -.395367 85 0e sta $032e STA DOS_STATUS -.395369 28 plp pass_failure PLP -.39536a 2b pld PLD -.39536b ab plb PLB -.39536c 18 clc CLC -.39536d 6b rtl RTL -.39536e ret_success -.39536e e2 20 sep #$20 SEP #$20 ; set A short -.395370 64 0e stz $032e STZ DOS_STATUS -.395372 28 plp PLP -.395373 2b pld PLD -.395374 ab plb PLB -.395375 38 sec SEC -.395376 6b rtl RTL -.395377 DOS_COPYPATH -.395377 da phx PHX -.395378 5a phy PHY -.395379 8b phb PHB -.39537a 0b phd PHD -.39537b 08 php PHP -.39537c 48 pha PHA ; begin setdbr macro -.39537d 08 php PHP -.39537e e2 20 sep #$20 SEP #$20 ; set A short -.395380 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.395382 48 pha PHA -.395383 ab plb PLB -.395384 28 plp PLP -.395385 68 pla PLA ; end setdbr macro -.395386 48 pha PHA ; begin setdp macro -.395387 08 php PHP -.395388 c2 20 rep #$20 REP #$20 ; set A long -.39538a a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.39538d 5b tcd TCD -.39538e 28 plp PLP -.39538f 68 pla PLA ; end setdp macro -.395390 c2 30 rep #$30 REP #$30 ; set A&X long -.395392 a9 00 00 lda #$0000 LDA #0 ; Set the DOS_PATH_BUFF to all zeros -.395395 a2 00 00 ldx #$0000 LDX #0 -.395398 95 e0 sta $0400,x clr_loop STA DOS_PATH_BUFF,X -.39539a e8 inx INX -.39539b e8 inx INX -.39539c e0 00 01 cpx #$0100 CPX #256 -.39539f d0 f7 bne $395398 BNE clr_loop -.3953a1 a5 20 lda $0340 LDA DOS_FD_PTR ; Is the DOS_FD_PTR null? -.3953a3 d0 04 bne $3953a9 BNE get_path ; No: attempt to fetch the path -.3953a5 a5 22 lda $0342 LDA DOS_FD_PTR+2 -.3953a7 f0 27 beq $3953d0 BEQ done ; Yes: return an empty buffer -.3953a9 a0 02 00 ldy #$0002 get_path LDY #FILEDESC.PATH ; Get the path buffer -.3953ac b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3953ae 85 28 sta $0348 STA DOS_TEMP -.3953b0 c8 iny INY -.3953b1 c8 iny INY -.3953b2 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3953b4 85 2a sta $034a STA DOS_TEMP+2 -.3953b6 a5 28 lda $0348 LDA DOS_TEMP ; Is the path pointer NULL? -.3953b8 d0 04 bne $3953be BNE start_copy ; No: start copying it -.3953ba a5 2a lda $034a LDA DOS_TEMP+2 -.3953bc f0 12 beq $3953d0 BEQ done ; Yes: return an empty buffer -.3953be start_copy -.3953be e2 20 sep #$20 SEP #$20 ; set A short -.3953c0 a2 00 00 ldx #$0000 LDX #0 -.3953c3 a0 00 00 ldy #$0000 LDY #0 -.3953c6 b7 28 lda [$0348],y loop LDA [DOS_TEMP],Y -.3953c8 95 e0 sta $0400,x STA DOS_PATH_BUFF,X -.3953ca f0 04 beq $3953d0 BEQ done -.3953cc e8 inx INX -.3953cd c8 iny INY -.3953ce d0 f6 bne $3953c6 BNE loop -.3953d0 28 plp done PLP -.3953d1 2b pld PLD -.3953d2 ab plb PLB -.3953d3 7a ply PLY -.3953d4 fa plx PLX -.3953d5 6b rtl RTL +.39535b a0 16 00 ldy #$0016 LDY #DIRENTRY.MODIFIED_TIME ; And DOS_DIR_PTR->MODIFIED_TIME +.39535e 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y +.395360 c2 20 rep #$20 REP #$20 ; set A long +.395362 22 22 44 39 jsl $394422 JSL DOS_DIRWRITE +.395366 b0 0b bcs $395373 BCS ret_success +.395368 80 04 bra $39536e BRA pass_failure +.39536a ret_failure +.39536a e2 20 sep #$20 SEP #$20 ; set A short +.39536c 85 0e sta $032e STA DOS_STATUS +.39536e 28 plp pass_failure PLP +.39536f 2b pld PLD +.395370 ab plb PLB +.395371 18 clc CLC +.395372 6b rtl RTL +.395373 ret_success +.395373 e2 20 sep #$20 SEP #$20 ; set A short +.395375 64 0e stz $032e STZ DOS_STATUS +.395377 28 plp PLP +.395378 2b pld PLD +.395379 ab plb PLB +.39537a 38 sec SEC +.39537b 6b rtl RTL +.39537c DOS_COPYPATH +.39537c da phx PHX +.39537d 5a phy PHY +.39537e 8b phb PHB +.39537f 0b phd PHD +.395380 08 php PHP +.395381 48 pha PHA ; begin setdbr macro +.395382 08 php PHP +.395383 e2 20 sep #$20 SEP #$20 ; set A short +.395385 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.395387 48 pha PHA +.395388 ab plb PLB +.395389 28 plp PLP +.39538a 68 pla PLA ; end setdbr macro +.39538b 48 pha PHA ; begin setdp macro +.39538c 08 php PHP +.39538d c2 20 rep #$20 REP #$20 ; set A long +.39538f a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395392 5b tcd TCD +.395393 28 plp PLP +.395394 68 pla PLA ; end setdp macro +.395395 c2 30 rep #$30 REP #$30 ; set A&X long +.395397 a9 00 00 lda #$0000 LDA #0 ; Set the DOS_PATH_BUFF to all zeros +.39539a a2 00 00 ldx #$0000 LDX #0 +.39539d 95 e0 sta $0400,x clr_loop STA DOS_PATH_BUFF,X +.39539f e8 inx INX +.3953a0 e8 inx INX +.3953a1 e0 00 01 cpx #$0100 CPX #256 +.3953a4 d0 f7 bne $39539d BNE clr_loop +.3953a6 a5 20 lda $0340 LDA DOS_FD_PTR ; Is the DOS_FD_PTR null? +.3953a8 d0 04 bne $3953ae BNE get_path ; No: attempt to fetch the path +.3953aa a5 22 lda $0342 LDA DOS_FD_PTR+2 +.3953ac f0 27 beq $3953d5 BEQ done ; Yes: return an empty buffer +.3953ae a0 02 00 ldy #$0002 get_path LDY #FILEDESC.PATH ; Get the path buffer +.3953b1 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3953b3 85 28 sta $0348 STA DOS_TEMP +.3953b5 c8 iny INY +.3953b6 c8 iny INY +.3953b7 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3953b9 85 2a sta $034a STA DOS_TEMP+2 +.3953bb a5 28 lda $0348 LDA DOS_TEMP ; Is the path pointer NULL? +.3953bd d0 04 bne $3953c3 BNE start_copy ; No: start copying it +.3953bf a5 2a lda $034a LDA DOS_TEMP+2 +.3953c1 f0 12 beq $3953d5 BEQ done ; Yes: return an empty buffer +.3953c3 start_copy +.3953c3 e2 20 sep #$20 SEP #$20 ; set A short +.3953c5 a2 00 00 ldx #$0000 LDX #0 +.3953c8 a0 00 00 ldy #$0000 LDY #0 +.3953cb b7 28 lda [$0348],y loop LDA [DOS_TEMP],Y +.3953cd 95 e0 sta $0400,x STA DOS_PATH_BUFF,X +.3953cf f0 04 beq $3953d5 BEQ done +.3953d1 e8 inx INX +.3953d2 c8 iny INY +.3953d3 d0 f6 bne $3953cb BNE loop +.3953d5 28 plp done PLP +.3953d6 2b pld PLD +.3953d7 ab plb PLB +.3953d8 7a ply PLY +.3953d9 fa plx PLX +.3953da 6b rtl RTL ;****** Return to file: src\sdos.asm -.3953d6 DOS_TEST -.3953d6 8b phb PHB -.3953d7 0b phd PHD -.3953d8 08 php PHP -.3953d9 48 pha PHA ; begin setdbr macro -.3953da 08 php PHP -.3953db e2 20 sep #$20 SEP #$20 ; set A short -.3953dd a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.3953df 48 pha PHA -.3953e0 ab plb PLB -.3953e1 28 plp PLP -.3953e2 68 pla PLA ; end setdbr macro -.3953e3 48 pha PHA ; begin setdp macro -.3953e4 08 php PHP -.3953e5 c2 20 rep #$20 REP #$20 ; set A long -.3953e7 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.3953ea 5b tcd TCD -.3953eb 28 plp PLP -.3953ec 68 pla PLA ; end setdp macro -.3953ed c2 30 rep #$30 REP #$30 ; set A&X long -.3953ef a9 15 54 lda #$5415 LDA #<>src_file -.3953f2 8f 64 03 00 sta $000364 STA @l DOS_STR1_PTR -.3953f6 a9 39 00 lda #$0039 LDA #`src_file -.3953f9 8f 66 03 00 sta $000366 STA @l DOS_STR1_PTR+2 -.3953fd a9 22 54 lda #$5422 LDA #<>dst_file -.395400 8f 68 03 00 sta $000368 STA @l DOS_STR2_PTR -.395404 a9 39 00 lda #$0039 LDA #`dst_file -.395407 8f 6a 03 00 sta $00036a STA @l DOS_STR2_PTR+2 -.39540b 22 b6 5a 39 jsl $395ab6 JSL IF_COPY -.39540f b0 00 bcs $395411 BCS done -.395411 28 plp done PLP -.395412 2b pld PLD -.395413 ab plb PLB -.395414 6b rtl RTL ->395415 40 73 3a 68 65 6c 6c 6f src_file .null "@s:hello.bas" ->39541d 2e 62 61 73 00 ->395422 40 73 3a 68 65 6c 6c 6f dst_file .null "@s:hello2.bas" ->39542a 32 2e 62 61 73 00 -.395430 IF_OPEN -.395430 da phx PHX -.395431 5a phy PHY -.395432 0b phd PHD -.395433 8b phb PHB -.395434 08 php PHP -.395435 48 pha PHA ; begin setdbr macro -.395436 08 php PHP -.395437 e2 20 sep #$20 SEP #$20 ; set A short -.395439 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.39543b 48 pha PHA -.39543c ab plb PLB -.39543d 28 plp PLP -.39543e 68 pla PLA ; end setdbr macro -.39543f 48 pha PHA ; begin setdp macro -.395440 08 php PHP -.395441 c2 20 rep #$20 REP #$20 ; set A long -.395443 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395446 5b tcd TCD -.395447 28 plp PLP -.395448 68 pla PLA ; end setdp macro -.395449 e2 20 sep #$20 SEP #$20 ; set A short -.39544b a0 00 00 ldy #$0000 LDY #FILEDESC.STATUS ; Get the status to make sure a open is ok -.39544e b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395450 89 38 bit #$38 BIT #FD_STAT_OPEN -.395452 f0 05 beq $395459 BEQ ok_to_open -.395454 a9 0f lda #$0f LDA #DOS_ERR_OPEN ; If already open: throw an error -.395456 82 1c 05 brl $395975 BRL IF_FAILURE -.395459 22 77 53 39 jsl $395377 ok_to_open JSL DOS_COPYPATH ; Copy the path to the path buffer -.39545d 22 d2 49 39 jsl $3949d2 JSL DOS_FINDFILE ; Attempt to find the file -.395461 b0 03 bcs $395466 BCS is_found ; If OK: we found the file -.395463 82 13 05 brl $395979 BRL IF_PASSFAILURE ; Otherwise: pass the failure up the chain -.395466 is_found -.395466 e2 20 sep #$20 SEP #$20 ; set A short -.395468 a0 01 00 ldy #$0001 LDY #FILEDESC.DEV ; Set the device in the file descriptor -.39546b a5 01 lda $0321 LDA BIOS_DEV -.39546d 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.39546f c2 20 rep #$20 REP #$20 ; set A long -.395471 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER ; Set the buffer point to the one provided in the file -.395474 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395476 85 1c sta $033c STA DOS_BUFF_PTR -.395478 c8 iny INY -.395479 c8 iny INY -.39547a b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.39547c 85 1e sta $033e STA DOS_BUFF_PTR+2 -.39547e 22 ec 47 39 jsl $3947ec JSL DOS_GETCLUSTER ; Attempt to load the cluster -.395482 b0 03 bcs $395487 BCS read_cluster -.395484 82 f2 04 brl $395979 BRL IF_PASSFAILURE -.395487 a0 0a 00 ldy #$000a read_cluster LDY #FILEDESC.FIRST_CLUSTER ; Set the first cluster in the file descriptor -.39548a a5 10 lda $0330 LDA DOS_CLUS_ID -.39548c 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.39548e c8 iny INY -.39548f c8 iny INY -.395490 a5 12 lda $0332 LDA DOS_CLUS_ID+2 -.395492 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.395494 a0 06 00 ldy #$0006 LDY #FILEDESC.CLUSTER ; Set the current cluster in the file descriptor -.395497 a5 10 lda $0330 LDA DOS_CLUS_ID -.395499 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.39549b c8 iny INY -.39549c c8 iny INY -.39549d a5 12 lda $0332 LDA DOS_CLUS_ID+2 -.39549f 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.3954a1 a0 1c 00 ldy #$001c LDY #DIRENTRY.SIZE ; Copy the filesize from the directory entry to the file descriptor -.3954a4 b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y -.3954a6 a0 12 00 ldy #$0012 LDY #FILEDESC.SIZE -.3954a9 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.3954ab a0 1e 00 ldy #$001e LDY #DIRENTRY.SIZE+2 -.3954ae b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y -.3954b0 a0 14 00 ldy #$0014 LDY #FILEDESC.SIZE+2 -.3954b3 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.3954b5 e2 20 sep #$20 SEP #$20 ; set A short -.3954b7 a0 00 00 ldy #$0000 LDY #FILEDESC.STATUS ; Mark file as open and readable -.3954ba a9 39 lda #$39 LDA #FD_STAT_OPEN | FD_STAT_READ -.3954bc 17 20 ora [$0340],y ORA [DOS_FD_PTR],Y -.3954be 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.3954c0 82 bd 04 brl $395980 BRL IF_SUCCESS -.3954c3 IF_CREATE -.3954c3 da phx PHX -.3954c4 5a phy PHY -.3954c5 0b phd PHD -.3954c6 8b phb PHB -.3954c7 08 php PHP -.3954c8 48 pha PHA ; begin setdbr macro -.3954c9 08 php PHP -.3954ca e2 20 sep #$20 SEP #$20 ; set A short -.3954cc a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.3954ce 48 pha PHA -.3954cf ab plb PLB -.3954d0 28 plp PLP -.3954d1 68 pla PLA ; end setdbr macro -.3954d2 48 pha PHA ; begin setdp macro -.3954d3 08 php PHP -.3954d4 c2 20 rep #$20 REP #$20 ; set A long -.3954d6 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.3954d9 5b tcd TCD -.3954da 28 plp PLP -.3954db 68 pla PLA ; end setdp macro -.3954dc 22 4a 52 39 jsl $39524a JSL DOS_CREATE ; Attempt to create the file -.3954e0 90 18 bcc $3954fa BCC pass_failure ; If it fails: pass the failure up the chain -.3954e2 c2 30 rep #$30 REP #$30 ; set A&X long -.3954e4 a0 06 00 ldy #$0006 LDY #FILEDESC.CLUSTER ; Sets the current cluster to 0 to make sure the next write appends -.3954e7 a9 00 00 lda #$0000 LDA #0 -.3954ea 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.3954ec c8 iny INY -.3954ed c8 iny INY -.3954ee 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.3954f0 e2 20 sep #$20 SEP #$20 ; set A short -.3954f2 a0 00 00 ldy #$0000 LDY #FILEDESC.STATUS -.3954f5 a9 3a lda #$3a LDA #FD_STAT_OPEN | FD_STAT_WRITE ; Set the file to open and APPEND only -.3954f7 82 86 04 brl $395980 BRL IF_SUCCESS -.3954fa 82 78 04 brl $395975 pass_failure BRL IF_FAILURE -.3954fd IF_CLOSE -.3954fd da phx PHX -.3954fe 5a phy PHY -.3954ff 0b phd PHD -.395500 8b phb PHB -.395501 08 php PHP -.395502 48 pha PHA ; begin setdbr macro -.395503 08 php PHP -.395504 e2 20 sep #$20 SEP #$20 ; set A short -.395506 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.395508 48 pha PHA -.395509 ab plb PLB -.39550a 28 plp PLP -.39550b 68 pla PLA ; end setdbr macro -.39550c 48 pha PHA ; begin setdp macro -.39550d 08 php PHP -.39550e c2 20 rep #$20 REP #$20 ; set A long -.395510 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395513 5b tcd TCD -.395514 28 plp PLP -.395515 68 pla PLA ; end setdp macro -.395516 e2 20 sep #$20 SEP #$20 ; set A short -.395518 a0 00 00 ldy #$0000 LDY #FILEDESC.STATUS ; Check to see if we were writing the file -.39551b b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.39551d 89 02 bit #$02 BIT #FD_STAT_WRITE -.39551f f0 09 beq $39552a BEQ set_flag ; No, just mark it closed -.395521 22 96 55 39 jsl $395596 JSL IF_WRITE ; Attempt to write the cluster -.395525 b0 03 bcs $39552a BCS set_flag -.395527 82 4f 04 brl $395979 BRL IF_PASSFAILURE ; If there was a problem, pass it up the chain -.39552a 22 6c 5a 39 jsl $395a6c set_flag JSL IF_FREEFD ; Free the file descriptor as well -.39552e 82 4f 04 brl $395980 BRL IF_SUCCESS -.395531 IF_READ -.395531 da phx PHX -.395532 5a phy PHY -.395533 0b phd PHD -.395534 8b phb PHB -.395535 08 php PHP -.395536 48 pha PHA ; begin setdbr macro -.395537 08 php PHP -.395538 e2 20 sep #$20 SEP #$20 ; set A short -.39553a a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.39553c 48 pha PHA -.39553d ab plb PLB -.39553e 28 plp PLP -.39553f 68 pla PLA ; end setdbr macro -.395540 48 pha PHA ; begin setdp macro -.395541 08 php PHP -.395542 c2 20 rep #$20 REP #$20 ; set A long -.395544 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395547 5b tcd TCD -.395548 28 plp PLP -.395549 68 pla PLA ; end setdp macro -.39554a c2 10 rep #$10 REP #$10 ; set X long -.39554c e2 20 sep #$20 SEP #$20 ; set A short -.39554e get_dev -.39554e e2 20 sep #$20 SEP #$20 ; set A short -.395550 a0 01 00 ldy #$0001 LDY #FILEDESC.DEV ; Get the device number from the file descriptor -.395553 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395555 85 01 sta $0321 STA BIOS_DEV -.395557 22 54 45 39 jsl $394554 JSL DOS_MOUNT ; Make sure the device is mounted (if needed) -.39555b c2 20 rep #$20 REP #$20 ; set A long -.39555d a0 06 00 ldy #$0006 LDY #FILEDESC.CLUSTER ; Get the file's current cluster -.395560 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395562 85 10 sta $0330 STA DOS_CLUS_ID -.395564 c8 iny INY -.395565 c8 iny INY -.395566 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395568 85 12 sta $0332 STA DOS_CLUS_ID+2 -.39556a 22 f7 4b 39 jsl $394bf7 JSL NEXTCLUSTER ; Find the next cluster of the file -.39556e 90 13 bcc $395583 BCC pass_failure ; If not OK: pass the failure up the chain -.395570 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER ; Get the pointer to the file's cluster buffer -.395573 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395575 85 1c sta $033c STA DOS_BUFF_PTR -.395577 c8 iny INY -.395578 c8 iny INY -.395579 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.39557b 85 1e sta $033e STA DOS_BUFF_PTR+2 -.39557d 22 ec 47 39 jsl $3947ec JSL DOS_GETCLUSTER ; Get the cluster -.395581 b0 03 bcs $395586 BCS ret_success ; If ok: return success -.395583 pass_failure -.395583 82 f3 03 brl $395979 BRL IF_PASSFAILURE ; Otherwise: bubble up the failure -.395586 a0 06 00 ldy #$0006 ret_success LDY #FILEDESC.CLUSTER ; Save the new cluster as the file's current cluster -.395589 a5 10 lda $0330 LDA DOS_CLUS_ID -.39558b 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.39558d c8 iny INY -.39558e c8 iny INY -.39558f a5 12 lda $0332 LDA DOS_CLUS_ID+2 -.395591 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.395593 82 ea 03 brl $395980 BRL IF_SUCCESS -.395596 IF_WRITE -.395596 da phx PHX -.395597 5a phy PHY -.395598 0b phd PHD -.395599 8b phb PHB -.39559a 08 php PHP -.39559b 48 pha PHA ; begin setdbr macro -.39559c 08 php PHP -.39559d e2 20 sep #$20 SEP #$20 ; set A short -.39559f a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.3955a1 48 pha PHA -.3955a2 ab plb PLB -.3955a3 28 plp PLP -.3955a4 68 pla PLA ; end setdbr macro -.3955a5 48 pha PHA ; begin setdp macro -.3955a6 08 php PHP -.3955a7 c2 20 rep #$20 REP #$20 ; set A long -.3955a9 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.3955ac 5b tcd TCD -.3955ad 28 plp PLP -.3955ae 68 pla PLA ; end setdp macro -.3955af c2 10 rep #$10 REP #$10 ; set X long -.3955b1 e2 20 sep #$20 SEP #$20 ; set A short -.3955b3 a0 01 00 ldy #$0001 get_dev LDY #FILEDESC.DEV ; Get the device number from the file descriptor -.3955b6 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3955b8 85 01 sta $0321 STA BIOS_DEV -.3955ba 22 54 45 39 jsl $394554 JSL DOS_MOUNT ; Make sure the device is mounted (if needed) -.3955be c2 20 rep #$20 REP #$20 ; set A long -.3955c0 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER ; Get the pointer to the file's cluster buffer -.3955c3 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3955c5 85 1c sta $033c STA DOS_BUFF_PTR -.3955c7 c8 iny INY -.3955c8 c8 iny INY -.3955c9 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3955cb 85 1e sta $033e STA DOS_BUFF_PTR+2 -.3955cd a0 06 00 ldy #$0006 LDY #FILEDESC.CLUSTER ; Get the file's current cluster -.3955d0 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3955d2 85 10 sta $0330 STA DOS_CLUS_ID -.3955d4 c8 iny INY -.3955d5 c8 iny INY -.3955d6 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3955d8 85 12 sta $0332 STA DOS_CLUS_ID+2 -.3955da d0 1a bne $3955f6 BNE rewrite_cluster ; If the cluster ID <> 0, overwrite it -.3955dc a5 10 lda $0330 LDA DOS_CLUS_ID -.3955de d0 16 bne $3955f6 BNE rewrite_cluster -.3955e0 a0 0a 00 ldy #$000a LDY #FILEDESC.FIRST_CLUSTER ; Get the file's first cluster -.3955e3 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3955e5 85 10 sta $0330 STA DOS_CLUS_ID -.3955e7 c8 iny INY -.3955e8 c8 iny INY -.3955e9 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3955eb 85 12 sta $0332 STA DOS_CLUS_ID+2 -.3955ed 22 18 50 39 jsl $395018 JSL DOS_APPENDCLUS ; Append the cluster -.3955f1 b0 0c bcs $3955ff BCS ret_success ; If OK: return success -.3955f3 82 83 03 brl $395979 BRL IF_PASSFAILURE ; Otherwise: bubble up the failure -.3955f6 22 29 48 39 jsl $394829 rewrite_cluster JSL DOS_PUTCLUSTER ; Over-write the cluster -.3955fa b0 03 bcs $3955ff BCS ret_success ; If ok: return success -.3955fc 82 7a 03 brl $395979 pass_failure BRL IF_PASSFAILURE ; Otherwise: bubble up the failure -.3955ff 82 7e 03 brl $395980 ret_success BRL IF_SUCCESS -.395602 IF_DIROPEN -.395602 da phx PHX -.395603 5a phy PHY -.395604 0b phd PHD -.395605 8b phb PHB -.395606 08 php PHP -.395607 48 pha PHA ; begin setdbr macro -.395608 08 php PHP -.395609 e2 20 sep #$20 SEP #$20 ; set A short -.39560b a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.39560d 48 pha PHA -.39560e ab plb PLB -.39560f 28 plp PLP -.395610 68 pla PLA ; end setdbr macro -.395611 48 pha PHA ; begin setdp macro -.395612 08 php PHP -.395613 c2 20 rep #$20 REP #$20 ; set A long -.395615 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395618 5b tcd TCD -.395619 28 plp PLP -.39561a 68 pla PLA ; end setdp macro -.39561b c2 30 rep #$30 REP #$30 ; set A&X long -.39561d 22 77 53 39 jsl $395377 JSL DOS_COPYPATH ; Copy the path from the file descriptor to the path buffer -.395621 22 3a 49 39 jsl $39493a JSL DOS_PARSE_PATH ; Parse the path -.395625 22 54 45 39 jsl $394554 JSL DOS_MOUNT ; Make sure we've mounted the SDC. -.395629 b0 03 bcs $39562e BCS get_root_dir ; If successful: get the root directory -.39562b 82 4b 03 brl $395979 BRL IF_PASSFAILURE ; Otherwise: pass the error up the chain -.39562e get_root_dir -.39562e c2 30 rep #$30 REP #$30 ; set A&X long -.395630 22 09 42 39 jsl $394209 JSL DOS_DIROPEN -.395634 b0 03 bcs $395639 BCS success -.395636 82 40 03 brl $395979 BRL IF_PASSFAILURE -.395639 82 44 03 brl $395980 success BRL IF_SUCCESS -.39563c IF_DIRNEXT -.39563c 5c a3 42 39 jmp $3942a3 JML DOS_DIRNEXT -.395640 IF_DELETE -.395640 da phx PHX -.395641 5a phy PHY -.395642 0b phd PHD -.395643 8b phb PHB -.395644 08 php PHP -.395645 48 pha PHA ; begin setdbr macro -.395646 08 php PHP -.395647 e2 20 sep #$20 SEP #$20 ; set A short -.395649 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.39564b 48 pha PHA -.39564c ab plb PLB -.39564d 28 plp PLP -.39564e 68 pla PLA ; end setdbr macro -.39564f 48 pha PHA ; begin setdp macro -.395650 08 php PHP -.395651 c2 20 rep #$20 REP #$20 ; set A long -.395653 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395656 5b tcd TCD -.395657 28 plp PLP -.395658 68 pla PLA ; end setdp macro -.395659 c2 30 rep #$30 REP #$30 ; set A&X long -.39565b 22 d2 49 39 jsl $3949d2 JSL DOS_FINDFILE -.39565f b0 03 bcs $395664 BCS get_first_clus -.395661 82 15 03 brl $395979 BRL IF_PASSFAILURE -.395664 get_first_clus -.395664 a0 1a 00 ldy #$001a LDY #DIRENTRY.CLUSTER_L -.395667 b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y -.395669 85 10 sta $0330 STA DOS_CLUS_ID -.39566b a0 14 00 ldy #$0014 LDY #DIRENTRY.CLUSTER_H -.39566e b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y -.395670 85 12 sta $0332 STA DOS_CLUS_ID+2 -.395672 a5 10 lda $0330 LDA DOS_CLUS_ID -.395674 8d 2a a0 sta $38a02a STA DOS_CURR_CLUS -.395677 a5 12 lda $0332 LDA DOS_CLUS_ID+2 -.395679 8d 2c a0 sta $38a02c STA DOS_CURR_CLUS+2 -.39567c 22 f7 4b 39 jsl $394bf7 del_loop JSL NEXTCLUSTER -.395680 90 2f bcc $3956b1 BCC del_one -.395682 a5 10 lda $0330 LDA DOS_CLUS_ID -.395684 8d 2e a0 sta $38a02e STA DOS_NEXT_CLUS -.395687 a5 12 lda $0332 LDA DOS_CLUS_ID+2 -.395689 8d 30 a0 sta $38a030 STA DOS_NEXT_CLUS+2 -.39568c ad 2a a0 lda $38a02a LDA DOS_CURR_CLUS -.39568f 85 10 sta $0330 STA DOS_CLUS_ID -.395691 ad 2c a0 lda $38a02c LDA DOS_CURR_CLUS+2 -.395694 85 12 sta $0332 STA DOS_CLUS_ID+2 -.395696 22 d8 4f 39 jsl $394fd8 JSL DELCLUSTER32 -.39569a b0 03 bcs $39569f BCS go_next -.39569c 82 da 02 brl $395979 BRL IF_PASSFAILURE -.39569f go_next -.39569f ad 2e a0 lda $38a02e LDA DOS_NEXT_CLUS -.3956a2 85 10 sta $0330 STA DOS_CLUS_ID -.3956a4 8d 2a a0 sta $38a02a STA DOS_CURR_CLUS -.3956a7 ad 30 a0 lda $38a030 LDA DOS_NEXT_CLUS+2 -.3956aa 85 12 sta $0332 STA DOS_CLUS_ID+2 -.3956ac 8d 2c a0 sta $38a02c STA DOS_CURR_CLUS+2 -.3956af 80 cb bra $39567c BRA del_loop -.3956b1 del_one -.3956b1 ad 2a a0 lda $38a02a LDA DOS_CURR_CLUS -.3956b4 85 10 sta $0330 STA DOS_CLUS_ID -.3956b6 ad 2c a0 lda $38a02c LDA DOS_CURR_CLUS+2 -.3956b9 85 12 sta $0332 STA DOS_CLUS_ID+2 -.3956bb 22 32 4f 39 jsl $394f32 JSL DELCLUSTER -.3956bf b0 03 bcs $3956c4 BCS free_dir_entry -.3956c1 82 b5 02 brl $395979 BRL IF_PASSFAILURE -.3956c4 free_dir_entry -.3956c4 e2 20 sep #$20 SEP #$20 ; set A short -.3956c6 a0 00 00 ldy #$0000 LDY #DIRENTRY.SHORTNAME ; Flag the directory entry as deleted -.3956c9 a9 e5 lda #$e5 LDA #DOS_DIR_ENT_UNUSED -.3956cb 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y -.3956cd 22 22 44 39 jsl $394422 JSL DOS_DIRWRITE ; Write the directory entry back -.3956d1 b0 03 bcs $3956d6 BCS ret_success -.3956d3 82 a3 02 brl $395979 BRL IF_PASSFAILURE -.3956d6 82 a7 02 brl $395980 ret_success BRL IF_SUCCESS -.3956d9 IF_DIRREAD -.3956d9 da phx PHX -.3956da 5a phy PHY -.3956db 0b phd PHD -.3956dc 8b phb PHB -.3956dd 08 php PHP -.3956de 48 pha PHA ; begin setdbr macro -.3956df 08 php PHP -.3956e0 e2 20 sep #$20 SEP #$20 ; set A short -.3956e2 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.3956e4 48 pha PHA -.3956e5 ab plb PLB -.3956e6 28 plp PLP -.3956e7 68 pla PLA ; end setdbr macro -.3956e8 48 pha PHA ; begin setdp macro -.3956e9 08 php PHP -.3956ea c2 20 rep #$20 REP #$20 ; set A long -.3956ec a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.3956ef 5b tcd TCD -.3956f0 28 plp PLP -.3956f1 68 pla PLA ; end setdp macro -.3956f2 c2 30 rep #$30 REP #$30 ; set A&X long -.3956f4 22 d2 49 39 jsl $3949d2 JSL DOS_FINDFILE -.3956f8 b0 03 bcs $3956fd BCS success -.3956fa 82 78 02 brl $395975 BRL IF_FAILURE -.3956fd 82 80 02 brl $395980 success BRL IF_SUCCESS -.395700 IF_DIRWRITE -.395700 5c 22 44 39 jmp $394422 JML DOS_DIRWRITE -.395704 IF_LOAD -.395704 da phx PHX -.395705 5a phy PHY -.395706 0b phd PHD -.395707 8b phb PHB -.395708 08 php PHP -.395709 48 pha PHA ; begin setdbr macro -.39570a 08 php PHP -.39570b e2 20 sep #$20 SEP #$20 ; set A short -.39570d a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.39570f 48 pha PHA -.395710 ab plb PLB -.395711 28 plp PLP -.395712 68 pla PLA ; end setdbr macro -.395713 48 pha PHA ; begin setdp macro -.395714 08 php PHP -.395715 c2 20 rep #$20 REP #$20 ; set A long -.395717 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.39571a 5b tcd TCD -.39571b 28 plp PLP -.39571c 68 pla PLA ; end setdp macro -.39571d c2 30 rep #$30 REP #$30 ; set A&X long -.39571f 22 30 54 39 jsl $395430 JSL IF_OPEN -.395723 b0 03 bcs $395728 BCS setup ; If success: start setting things up -.395725 82 51 02 brl $395979 BRL IF_PASSFAILURE ; Otherwise: pass the failure up the chain -.395728 setup -.395728 c2 20 rep #$20 REP #$20 ; set A long -.39572a a0 12 00 ldy #$0012 LDY #FILEDESC.SIZE ; Record the size of the file in DOS_FILE_SIZE -.39572d b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.39572f 85 2c sta $034c STA DOS_FILE_SIZE -.395731 c8 iny INY -.395732 c8 iny INY -.395733 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395735 85 2e sta $034e STA DOS_FILE_SIZE+2 -.395737 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER ; Set up the source pointer -.39573a b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.39573c 85 30 sta $0350 STA DOS_SRC_PTR -.39573e c8 iny INY -.39573f c8 iny INY -.395740 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395742 85 32 sta $0352 STA DOS_SRC_PTR+2 -.395744 a5 36 lda $0356 LDA DOS_DST_PTR+2 ; Is there a destination address in RAM? -.395746 c9 40 00 cmp #$0040 CMP #$0040 -.395749 b0 04 bcs $39574f BGE load_by_type ; No: try to load it by type -.39574b 5c 2a 58 39 jmp $39582a JML IF_LOADRAW ; Otherwise, load it to the supplied destination -.39574f a0 08 00 ldy #$0008 load_by_type LDY #8 ; Point to the first extension byte -.395752 a2 00 00 ldx #$0000 LDX #0 ; and the first byte of the table -.395755 type_loop -.395755 e2 20 sep #$20 SEP #$20 ; set A short -.395757 bf 9b 57 39 lda $39579b,x LDA LOAD_TYPE_TABLE,X ; Get 1st extension character of the entry -.39575b f0 37 beq $395794 BEQ no_match ; If NULL... we didn't get a match -.39575d d9 3a a0 cmp $38a03a,y CMP DOS_SHORT_NAME,Y ; Get the character of the extension -.395760 d0 28 bne $39578a BNE next_entry ; If they don't match, try the next entry -.395762 bf 9c 57 39 lda $39579c,x LDA LOAD_TYPE_TABLE+1,X ; Get 2nd extension character of the entry -.395766 d9 3b a0 cmp $38a03b,y CMP DOS_SHORT_NAME+1,Y ; Get the 2nd character of the extension -.395769 d0 1f bne $39578a BNE next_entry ; If they don't match, try the next entry -.39576b bf 9d 57 39 lda $39579d,x LDA LOAD_TYPE_TABLE+2,X ; Get 3rd extension character of the entry -.39576f d9 3c a0 cmp $38a03c,y CMP DOS_SHORT_NAME+2,Y ; Get the 3rd character of the extension -.395772 d0 16 bne $39578a BNE next_entry ; If they don't match, try the next entry -.395774 c2 20 rep #$20 REP #$20 ; set A long -.395776 bf 9e 57 39 lda $39579e,x LDA LOAD_TYPE_TABLE+3,X ; Get the low word of the address -.39577a 85 28 sta $0348 STA DOS_TEMP ; Save it to the jump vector -.39577c e2 20 sep #$20 SEP #$20 ; set A short -.39577e bf a0 57 39 lda $3957a0,x LDA LOAD_TYPE_TABLE+5,X ; Get the high byte of the address -.395782 85 2a sta $034a STA DOS_TEMP+2 ; Save it to the jump vector -.395784 a2 00 00 ldx #$0000 LDX #0 -.395787 dc 48 03 jmp [$0348] JML [DOS_TEMP] ; Jump to the loading routine -.39578a next_entry -.39578a c2 30 rep #$30 REP #$30 ; set A&X long -.39578c 8a txa TXA -.39578d 18 clc CLC -.39578e 69 06 00 adc #$0006 ADC #6 -.395791 aa tax TAX -.395792 80 c1 bra $395755 BRA type_loop ; And check it against the file -.395794 no_match -.395794 e2 20 sep #$20 SEP #$20 ; set A short -.395796 a9 11 lda #$11 LDA #DOS_ERR_NOEXEC ; Return an not-executable error -.395798 82 da 01 brl $395975 BRL IF_FAILURE ->39579b 50 47 58 LOAD_TYPE_TABLE .text "PGX" ; "PGX" --> IF_LOADPGX ->39579e a2 57 .word <>IF_LOADPGX ->3957a0 39 .byte `IF_LOADPGX ->3957a1 00 .byte 0 -.3957a2 IF_LOADPGX -.3957a2 c2 10 rep #$10 REP #$10 ; set X long -.3957a4 e2 20 sep #$20 SEP #$20 ; set A short -.3957a6 a0 00 00 ldy #$0000 LDY #0 -.3957a9 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y ; Check for "PGX" signature -.3957ab c9 50 cmp #$50 CMP #'P' -.3957ad d0 15 bne $3957c4 BNE fail_sig ; If not found, fail -.3957af c8 iny INY -.3957b0 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y -.3957b2 c9 47 cmp #$47 CMP #'G' -.3957b4 d0 0e bne $3957c4 BNE fail_sig -.3957b6 c8 iny INY -.3957b7 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y -.3957b9 c9 58 cmp #$58 CMP #'X' -.3957bb d0 07 bne $3957c4 BNE fail_sig -.3957bd c8 iny INY ; Check for CPU and version code ($01 for 65816) -.3957be b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y -.3957c0 c9 01 cmp #$01 CMP #$01 -.3957c2 f0 17 beq $3957db BEQ get_dest ; All passes: go to get the destination address -.3957c4 a9 10 lda #$10 fail_sig LDA #DOS_ERR_PGXSIG ; Fail with a PGXSIG error code -.3957c6 22 75 59 39 jsl $395975 JSL IF_FAILURE -.3957ca adjust_size -.3957ca c2 20 rep #$20 REP #$20 ; set A long -.3957cc 38 sec SEC ; Subtract the 8 bytes of the header from the file size -.3957cd a5 2c lda $034c LDA DOS_FILE_SIZE -.3957cf e9 08 00 sbc #$0008 SBC #8 -.3957d2 85 2c sta $034c STA DOS_FILE_SIZE -.3957d4 a5 2e lda $034e LDA DOS_FILE_SIZE+2 -.3957d6 e9 00 00 sbc #$0000 SBC #0 -.3957d9 85 2e sta $034e STA DOS_FILE_SIZE+2 -.3957db get_dest -.3957db c2 20 rep #$20 REP #$20 ; set A long -.3957dd c8 iny INY -.3957de b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y ; Get low word of destination address -.3957e0 85 34 sta $0354 STA DOS_DST_PTR ; And save it to the destination pointer -.3957e2 85 3c sta $035c STA DOS_RUN_PTR ; And save it to the RUN pointer -.3957e4 c8 iny INY -.3957e5 c8 iny INY -.3957e6 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y ; Get high word of destination address -.3957e8 85 36 sta $0356 STA DOS_DST_PTR+2 -.3957ea 85 3e sta $035e STA DOS_RUN_PTR+2 -.3957ec c8 iny INY ; Point to the first data byte -.3957ed c8 iny INY -.3957ee copy_loop -.3957ee e2 20 sep #$20 SEP #$20 ; set A short -.3957f0 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y ; Read a byte from the file -.3957f2 87 34 sta [$0354] STA [DOS_DST_PTR] ; Write it to the destination -.3957f4 c2 20 rep #$20 REP #$20 ; set A long -.3957f6 e6 34 inc $0354 INC DOS_DST_PTR ; Move to the next destination location -.3957f8 d0 02 bne $3957fc BNE dec_file_size -.3957fa e6 36 inc $0356 INC DOS_DST_PTR+2 -.3957fc 38 sec dec_file_size SEC ; Count down the number of bytes to read -.3957fd a5 2c lda $034c LDA DOS_FILE_SIZE -.3957ff e9 01 00 sbc #$0001 SBC #1 -.395802 85 2c sta $034c STA DOS_FILE_SIZE -.395804 a5 2e lda $034e LDA DOS_FILE_SIZE+2 -.395806 e9 00 00 sbc #$0000 SBC #0 -.395809 85 2e sta $034e STA DOS_FILE_SIZE+2 -.39580b a5 2c lda $034c LDA DOS_FILE_SIZE ; Are we at the end of the file? -.39580d d0 04 bne $395813 BNE next_byte -.39580f a5 2e lda $034e LDA DOS_FILE_SIZE+2 -.395811 f0 14 beq $395827 BEQ done ; Yes: we're done -.395813 c8 iny next_byte INY ; Otherwise, move to the next source location -.395814 cc 0e a0 cpy $38a00e CPY CLUSTER_SIZE ; Are we at the end of the cluster? -.395817 d0 d5 bne $3957ee BNE copy_loop ; No: keep copying -.395819 22 fb 4c 39 jsl $394cfb JSL DOS_READNEXT ; Yes: Load the next cluster -.39581d b0 03 bcs $395822 BCS next_cluster -.39581f 82 57 01 brl $395979 BRL IF_PASSFAILURE ; If failed: pass that up the chain -.395822 a0 00 00 ldy #$0000 next_cluster LDY #0 -.395825 80 c7 bra $3957ee BRA copy_loop ; Go back to copying -.395827 82 56 01 brl $395980 done BRL IF_SUCCESS -.39582a IF_LOADRAW -.39582a c2 30 rep #$30 REP #$30 ; set A&X long -.39582c a0 00 00 ldy #$0000 copy_cluster LDY #0 -.39582f copy_loop -.39582f e2 20 sep #$20 SEP #$20 ; set A short -.395831 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y ; Copy byte from cluster to destination -.395833 97 34 sta [$0354],y STA [DOS_DST_PTR],Y -.395835 c2 20 rep #$20 REP #$20 ; set A long -.395837 38 sec SEC ; Count down the number of bytes left -.395838 a5 2c lda $034c LDA DOS_FILE_SIZE -.39583a e9 01 00 sbc #$0001 SBC #1 -.39583d 85 2c sta $034c STA DOS_FILE_SIZE -.39583f a5 2e lda $034e LDA DOS_FILE_SIZE+2 -.395841 e9 00 00 sbc #$0000 SBC #0 -.395844 85 2e sta $034e STA DOS_FILE_SIZE+2 -.395846 d0 04 bne $39584c BNE continue -.395848 a5 2c lda $034c LDA DOS_FILE_SIZE -.39584a f0 1b beq $395867 BEQ close_file ; If not: we're done -.39584c c8 iny continue INY -.39584d cc 0e a0 cpy $38a00e CPY CLUSTER_SIZE ; Are we done with the cluster? -.395850 d0 dd bne $39582f BNE copy_loop ; No: keep processing the bytes -.395852 18 clc CLC ; Advance the destination pointer to the next chunk of memory -.395853 a5 34 lda $0354 LDA DOS_DST_PTR -.395855 6d 0e a0 adc $38a00e ADC CLUSTER_SIZE -.395858 85 34 sta $0354 STA DOS_DST_PTR -.39585a a5 36 lda $0356 LDA DOS_DST_PTR+2 -.39585c 69 00 00 adc #$0000 ADC #0 -.39585f 85 36 sta $0356 STA DOS_DST_PTR+2 -.395861 22 31 55 39 jsl $395531 JSL IF_READ ; Yes: load the next cluster -.395865 b0 c5 bcs $39582c BCS copy_cluster ; And start copying it -.395867 close_file -.395867 82 16 01 brl $395980 ret_success BRL IF_SUCCESS -.39586a IF_NULLBUFFER -.39586a 5a phy PHY -.39586b 8b phb PHB -.39586c 0b phd PHD -.39586d 08 php PHP -.39586e 48 pha PHA ; begin setdbr macro -.39586f 08 php PHP -.395870 e2 20 sep #$20 SEP #$20 ; set A short -.395872 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.395874 48 pha PHA -.395875 ab plb PLB -.395876 28 plp PLP -.395877 68 pla PLA ; end setdbr macro -.395878 48 pha PHA ; begin setdp macro -.395879 08 php PHP -.39587a c2 20 rep #$20 REP #$20 ; set A long -.39587c a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.39587f 5b tcd TCD -.395880 28 plp PLP -.395881 68 pla PLA ; end setdp macro -.395882 c2 30 rep #$30 REP #$30 ; set A&X long -.395884 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER -.395887 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395889 85 28 sta $0348 STA DOS_TEMP -.39588b c8 iny INY -.39588c c8 iny INY -.39588d b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.39588f 85 2a sta $034a STA DOS_TEMP+2 -.395891 a0 00 00 ldy #$0000 LDY #0 -.395894 a9 00 00 lda #$0000 LDA #0 -.395897 97 28 sta [$0348],y loop STA [DOS_TEMP],Y -.395899 c8 iny INY -.39589a c8 iny INY -.39589b c0 00 02 cpy #$0200 CPY #DOS_SECTOR_SIZE -.39589e d0 f7 bne $395897 BNE loop -.3958a0 28 plp PLP -.3958a1 2b pld PLD -.3958a2 ab plb PLB -.3958a3 7a ply PLY -.3958a4 6b rtl RTL -.3958a5 IF_COPY2BUFF -.3958a5 5a phy PHY -.3958a6 8b phb PHB -.3958a7 0b phd PHD -.3958a8 08 php PHP -.3958a9 48 pha PHA ; begin setdbr macro -.3958aa 08 php PHP -.3958ab e2 20 sep #$20 SEP #$20 ; set A short -.3958ad a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.3958af 48 pha PHA -.3958b0 ab plb PLB -.3958b1 28 plp PLP -.3958b2 68 pla PLA ; end setdbr macro -.3958b3 48 pha PHA ; begin setdp macro -.3958b4 08 php PHP -.3958b5 c2 20 rep #$20 REP #$20 ; set A long -.3958b7 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.3958ba 5b tcd TCD -.3958bb 28 plp PLP -.3958bc 68 pla PLA ; end setdp macro -.3958bd c2 30 rep #$30 REP #$30 ; set A&X long -.3958bf a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER -.3958c2 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3958c4 85 28 sta $0348 STA DOS_TEMP -.3958c6 c8 iny INY -.3958c7 c8 iny INY -.3958c8 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.3958ca 85 2a sta $034a STA DOS_TEMP+2 -.3958cc a0 00 00 ldy #$0000 LDY #0 -.3958cf copy_loop -.3958cf e2 20 sep #$20 SEP #$20 ; set A short -.3958d1 a7 30 lda [$0350] LDA [DOS_SRC_PTR] ; Copy a byte -.3958d3 97 28 sta [$0348],y STA [DOS_TEMP],Y -.3958d5 c2 20 rep #$20 REP #$20 ; set A long -.3958d7 e6 30 inc $0350 INC DOS_SRC_PTR ; Advance the source pointer -.3958d9 d0 02 bne $3958dd BNE adv_dest -.3958db e6 32 inc $0352 INC DOS_SRC_PTR+2 -.3958dd c8 iny adv_dest INY ; Count it -.3958de c0 00 02 cpy #$0200 CPY #DOS_SECTOR_SIZE ; Have we reached the limit? -.3958e1 f0 0c beq $3958ef BEQ done ; Yes: we're done -.3958e3 a5 30 lda $0350 LDA DOS_SRC_PTR ; Check if we copied the last byte -.3958e5 c5 38 cmp $0358 CMP DOS_END_PTR -.3958e7 d0 e6 bne $3958cf BNE copy_loop ; No: keep copying -.3958e9 a5 32 lda $0352 LDA DOS_SRC_PTR+2 -.3958eb c5 3a cmp $035a CMP DOS_END_PTR+2 -.3958ed d0 e0 bne $3958cf BNE copy_loop -.3958ef 28 plp done PLP -.3958f0 2b pld PLD -.3958f1 ab plb PLB -.3958f2 7a ply PLY -.3958f3 6b rtl RTL -.3958f4 IF_SAVE -.3958f4 da phx PHX -.3958f5 5a phy PHY -.3958f6 0b phd PHD -.3958f7 8b phb PHB -.3958f8 08 php PHP -.3958f9 48 pha PHA ; begin setdbr macro -.3958fa 08 php PHP -.3958fb e2 20 sep #$20 SEP #$20 ; set A short -.3958fd a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.3958ff 48 pha PHA -.395900 ab plb PLB -.395901 28 plp PLP -.395902 68 pla PLA ; end setdbr macro -.395903 48 pha PHA ; begin setdp macro -.395904 08 php PHP -.395905 c2 20 rep #$20 REP #$20 ; set A long -.395907 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.39590a 5b tcd TCD -.39590b 28 plp PLP -.39590c 68 pla PLA ; end setdp macro -.39590d c2 30 rep #$30 REP #$30 ; set A&X long -.39590f a0 12 00 ldy #$0012 LDY #FILEDESC.SIZE ; DOS_FD_PTR->SIZE := DOS_END_PTR - DOS_SRC_PTR -.395912 38 sec SEC -.395913 a5 38 lda $0358 LDA DOS_END_PTR -.395915 e5 30 sbc $0350 SBC DOS_SRC_PTR -.395917 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.395919 c8 iny INY -.39591a c8 iny INY -.39591b a5 3a lda $035a LDA DOS_END_PTR+2 -.39591d e5 32 sbc $0352 SBC DOS_SRC_PTR+2 -.39591f 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.395921 a0 12 00 ldy #$0012 LDY #FILEDESC.SIZE ; DOS_FD_PTR->SIZE++ -.395924 18 clc CLC -.395925 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395927 69 01 00 adc #$0001 ADC #1 -.39592a 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.39592c 90 09 bcc $395937 BCC first_block -.39592e c8 iny INY -.39592f c8 iny INY -.395930 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y -.395932 69 00 00 adc #$0000 ADC #0 -.395935 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.395937 22 6a 58 39 jsl $39586a first_block JSL IF_NULLBUFFER ; Fill FD buffer with NULL -.39593b 22 a5 58 39 jsl $3958a5 JSL IF_COPY2BUFF ; Copy first (at most) 512 bytes of data to FD buffer -.39593f 22 c3 54 39 jsl $3954c3 JSL IF_CREATE ; Create file. -.395943 b0 03 bcs $395948 BCS check_for_end -.395945 82 31 00 brl $395979 BRL IF_PASSFAILURE ; If we couldn't create the file, pass the failure up -.395948 a5 30 lda $0350 check_for_end LDA DOS_SRC_PTR ; Check if we copied the last byte -.39594a c5 38 cmp $0358 CMP DOS_END_PTR -.39594c d0 06 bne $395954 BNE next_block -.39594e a5 32 lda $0352 LDA DOS_SRC_PTR+2 -.395950 c5 3a cmp $035a CMP DOS_END_PTR+2 -.395952 f0 1d beq $395971 BEQ done ; Yes: we're done -.395954 22 6a 58 39 jsl $39586a next_block JSL IF_NULLBUFFER ; Fill FD buffer with NULL -.395958 22 a5 58 39 jsl $3958a5 JSL IF_COPY2BUFF ; Copy next (at most) 512 bytes of data to FD buffer -.39595c a0 06 00 ldy #$0006 LDY #FILEDESC.CLUSTER ; Make sure the CLUSTER is 0 to force an append -.39595f a9 00 00 lda #$0000 LDA #0 -.395962 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.395964 c8 iny INY -.395965 c8 iny INY -.395966 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.395968 22 96 55 39 jsl $395596 JSL IF_WRITE ; Append to the file -.39596c b0 da bcs $395948 BCS check_for_end ; And try again -.39596e 82 08 00 brl $395979 BRL IF_PASSFAILURE ; If we couldn't update the file, pass the failure up -.395971 5c 80 59 39 jmp $395980 done JML IF_SUCCESS -.395975 IF_FAILURE -.395975 e2 20 sep #$20 SEP #$20 ; set A short -.395977 85 0e sta $032e STA DOS_STATUS -.395979 28 plp IF_PASSFAILURE PLP -.39597a 18 clc CLC -.39597b ab plb PLB -.39597c 2b pld PLD -.39597d 7a ply PLY -.39597e fa plx PLX -.39597f 6b rtl RTL -.395980 IF_SUCCESS -.395980 e2 20 sep #$20 SEP #$20 ; set A short -.395982 64 00 stz $0320 STZ BIOS_STATUS -.395984 64 0e stz $032e STZ DOS_STATUS -.395986 28 plp PLP -.395987 38 sec SEC -.395988 ab plb PLB -.395989 2b pld PLD -.39598a 7a ply PLY -.39598b fa plx PLX -.39598c 6b rtl RTL -.39598d IF_RUN -.39598d da phx PHX -.39598e 5a phy PHY -.39598f 0b phd PHD -.395990 8b phb PHB -.395991 08 php PHP -.395992 48 pha PHA ; begin setdbr macro -.395993 08 php PHP -.395994 e2 20 sep #$20 SEP #$20 ; set A short -.395996 a9 00 lda #$00 LDA #0 -.395998 48 pha PHA -.395999 ab plb PLB -.39599a 28 plp PLP -.39599b 68 pla PLA ; end setdbr macro -.39599c 48 pha PHA ; begin setdp macro -.39599d 08 php PHP -.39599e c2 20 rep #$20 REP #$20 ; set A long -.3959a0 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.3959a3 5b tcd TCD -.3959a4 28 plp PLP -.3959a5 68 pla PLA ; end setdp macro -.3959a6 e2 20 sep #$20 SEP #$20 ; set A short -.3959a8 c2 10 rep #$10 REP #$10 ; set X long -.3959aa a9 00 lda #$00 LDA #0 ; Zero out the file descriptor -.3959ac a2 00 00 ldx #$0000 LDX #0 -.3959af 9f 00 ad 38 sta $38ad00,x clr_fd_loop STA @l DOS_SPARE_FD,X -.3959b3 e8 inx INX -.3959b4 e0 20 00 cpx #$0020 CPX #SIZE(FILEDESC) -.3959b7 d0 f6 bne $3959af BNE clr_fd_loop -.3959b9 c2 20 rep #$20 REP #$20 ; set A long -.3959bb a9 00 ab lda #$ab00 LDA #<>DOS_SPARE_SECTOR ; Set the buffer for the file descriptor -.3959be 8f 0e ad 38 sta $38ad0e STA @l DOS_SPARE_FD+FILEDESC.BUFFER -.3959c2 a9 38 00 lda #$0038 LDA #`DOS_SPARE_SECTOR -.3959c5 8f 10 ad 38 sta $38ad10 STA @l DOS_SPARE_FD+FILEDESC.BUFFER+2 -.3959c9 a5 40 lda $0360 LDA DOS_RUN_PARAM ; Set the path for the file descriptor -.3959cb 8f 02 ad 38 sta $38ad02 STA @l DOS_SPARE_FD+FILEDESC.PATH -.3959cf a5 42 lda $0362 LDA DOS_RUN_PARAM+2 -.3959d1 8f 04 ad 38 sta $38ad04 STA @l DOS_SPARE_FD+FILEDESC.PATH+2 -.3959d5 a9 00 00 lda #$0000 LDA #0 ; Clear the run pointer -.3959d8 85 3c sta $035c STA DOS_RUN_PTR ; This is used to check that we loaded an executable binary -.3959da 85 3e sta $035e STA DOS_RUN_PTR+2 -.3959dc a9 00 ad lda #$ad00 LDA #<>DOS_SPARE_FD -.3959df 85 20 sta $0340 STA DOS_FD_PTR -.3959e1 a9 38 00 lda #$0038 LDA #`DOS_SPARE_FD -.3959e4 85 22 sta $0342 STA DOS_FD_PTR+2 -.3959e6 a9 ff ff lda #$ffff LDA #$FFFF ; We want to load to the address provided by the file -.3959e9 8f 54 03 00 sta $000354 STA @l DOS_DST_PTR -.3959ed 8f 56 03 00 sta $000356 STA @l DOS_DST_PTR+2 -.3959f1 22 18 11 00 jsl $001118 JSL F_LOAD ; Try to load the file -.3959f5 b0 14 bcs $395a0b BCS try_execute -.3959f7 82 7f ff brl $395979 BRL IF_PASSFAILURE ; On error: pass failure up the chain -.3959fa chk_execute -.3959fa c2 20 rep #$20 REP #$20 ; set A long -.3959fc a5 3c lda $035c LDA DOS_RUN_PTR ; Check to see if we got a startup address back -.3959fe d0 0b bne $395a0b BNE try_execute ; If so: call it -.395a00 a5 3e lda $035e LDA DOS_RUN_PTR+2 -.395a02 d0 07 bne $395a0b BNE try_execute -.395a04 e2 20 sep #$20 SEP #$20 ; set A short -.395a06 a9 11 lda #$11 LDA #DOS_ERR_NOEXEC ; If not: return an error that it's not executable -.395a08 82 6a ff brl $395975 BRL IF_FAILURE -.395a0b try_execute -.395a0b e2 20 sep #$20 SEP #$20 ; set A short -.395a0d a9 5c lda #$5c LDA #$5C ; Write a JML opcode -.395a0f 85 3b sta $035b STA DOS_RUN_PTR-1 -.395a11 22 5b 03 00 jsl $00035b JSL DOS_RUN_PTR-1 ; And call to it -.395a15 82 68 ff brl $395980 BRL IF_SUCCESS ; Return success -.395a18 IF_ALLOCFD -.395a18 da phx PHX -.395a19 5a phy PHY -.395a1a 0b phd PHD -.395a1b 8b phb PHB -.395a1c 08 php PHP -.395a1d 48 pha PHA ; begin setdbr macro -.395a1e 08 php PHP -.395a1f e2 20 sep #$20 SEP #$20 ; set A short -.395a21 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.395a23 48 pha PHA -.395a24 ab plb PLB -.395a25 28 plp PLP -.395a26 68 pla PLA ; end setdbr macro -.395a27 48 pha PHA ; begin setdp macro -.395a28 08 php PHP -.395a29 c2 20 rep #$20 REP #$20 ; set A long -.395a2b a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395a2e 5b tcd TCD -.395a2f 28 plp PLP -.395a30 68 pla PLA ; end setdp macro -.395a31 c2 10 rep #$10 REP #$10 ; set X long -.395a33 a2 00 00 ldx #$0000 LDX #0 ; Point to the first file descriptor -.395a36 chk_fd -.395a36 e2 20 sep #$20 SEP #$20 ; set A short -.395a38 bd 20 ad lda $38ad20,x LDA @w DOS_FILE_DESCS,X ; Check the file descriptor's status -.395a3b 89 10 bit #$10 BIT #FD_STAT_ALLOC ; Is the file descriptor allocated? -.395a3d f0 14 beq $395a53 BEQ found ; No: flag and return the found descriptor -.395a3f next_fd -.395a3f c2 20 rep #$20 REP #$20 ; set A long -.395a41 8a txa TXA ; Yes: Move to the next file descriptor -.395a42 18 clc CLC -.395a43 69 20 00 adc #$0020 ADC #SIZE(FILEDESC) -.395a46 aa tax TAX -.395a47 e0 00 01 cpx #$0100 CPX #SIZE(FILEDESC) * DOS_FD_MAX ; Are we out of file descriptors? -.395a4a 90 ea bcc $395a36 BLT chk_fd ; No: check this new file descriptor -.395a4c e2 20 sep #$20 SEP #$20 ; set A short -.395a4e a9 16 lda #$16 LDA #DOS_ERR_NOFD ; Yes: Return failure (no file descriptors available) -.395a50 82 22 ff brl $395975 BRL IF_FAILURE -.395a53 09 10 ora #$10 found ORA #FD_STAT_ALLOC ; No: Set the ALLOC bit -.395a55 9d 20 ad sta $38ad20,x STA @w DOS_FILE_DESCS,X ; And store it in the file descriptor's status -.395a58 c2 20 rep #$20 REP #$20 ; set A long -.395a5a 8a txa TXA -.395a5b 18 clc CLC -.395a5c 69 20 ad adc #$ad20 ADC #<>DOS_FILE_DESCS -.395a5f 85 20 sta $0340 STA @b DOS_FD_PTR -.395a61 a9 38 00 lda #$0038 LDA #`DOS_FILE_DESCS -.395a64 69 00 00 adc #$0000 ADC #0 -.395a67 85 22 sta $0342 STA @b DOS_FD_PTR+2 -.395a69 82 14 ff brl $395980 BRL IF_SUCCESS ; Return this file descriptor -.395a6c IF_FREEFD -.395a6c da phx PHX -.395a6d 5a phy PHY -.395a6e 0b phd PHD -.395a6f 8b phb PHB -.395a70 08 php PHP -.395a71 48 pha PHA ; begin setdbr macro -.395a72 08 php PHP -.395a73 e2 20 sep #$20 SEP #$20 ; set A short -.395a75 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES -.395a77 48 pha PHA -.395a78 ab plb PLB -.395a79 28 plp PLP -.395a7a 68 pla PLA ; end setdbr macro -.395a7b 48 pha PHA ; begin setdp macro -.395a7c 08 php PHP -.395a7d c2 20 rep #$20 REP #$20 ; set A long -.395a7f a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395a82 5b tcd TCD -.395a83 28 plp PLP -.395a84 68 pla PLA ; end setdp macro -.395a85 e2 20 sep #$20 SEP #$20 ; set A short -.395a87 c2 10 rep #$10 REP #$10 ; set X long -.395a89 a9 00 lda #$00 LDA #0 -.395a8b 87 20 sta [$0340] STA [DOS_FD_PTR] -.395a8d 82 f0 fe brl $395980 BRL IF_SUCCESS -.395a90 DOS_SRC2DST -.395a90 da phx PHX -.395a91 5a phy PHY -.395a92 0b phd PHD -.395a93 8b phb PHB -.395a94 08 php PHP -.395a95 48 pha PHA ; begin setdp macro -.395a96 08 php PHP -.395a97 c2 20 rep #$20 REP #$20 ; set A long -.395a99 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395a9c 5b tcd TCD -.395a9d 28 plp PLP -.395a9e 68 pla PLA ; end setdp macro -.395a9f c2 30 rep #$30 REP #$30 ; set A&X long -.395aa1 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER -.395aa4 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y -.395aa6 aa tax TAX ; X := source buffer address -.395aa7 b7 34 lda [$0354],y LDA [DOS_DST_PTR],Y -.395aa9 a8 tay TAY ; Y := destination buffer address -.395aaa a9 00 02 lda #$0200 LDA #DOS_SECTOR_SIZE ; A := the size of the buffers -.395aad 54 38 38 mvn $38,$38 MVN #`DOS_FILE_BUFFS,#`DOS_FILE_BUFFS ; Copy the sector data -.395ab0 28 plp PLP -.395ab1 ab plb PLB -.395ab2 2b pld PLD -.395ab3 7a ply PLY -.395ab4 fa plx PLX -.395ab5 6b rtl RTL -.395ab6 IF_COPY -.395ab6 da phx PHX -.395ab7 5a phy PHY -.395ab8 0b phd PHD -.395ab9 8b phb PHB -.395aba 08 php PHP -.395abb 48 pha PHA ; begin setdbr macro -.395abc 08 php PHP -.395abd e2 20 sep #$20 SEP #$20 ; set A short -.395abf a9 00 lda #$00 LDA #0 -.395ac1 48 pha PHA -.395ac2 ab plb PLB -.395ac3 28 plp PLP -.395ac4 68 pla PLA ; end setdbr macro -.395ac5 48 pha PHA ; begin setdp macro -.395ac6 08 php PHP -.395ac7 c2 20 rep #$20 REP #$20 ; set A long -.395ac9 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395acc 5b tcd TCD -.395acd 28 plp PLP -.395ace 68 pla PLA ; end setdp macro -.395acf 22 18 5a 39 jsl $395a18 JSL IF_ALLOCFD ; Allocate an FD for the source -.395ad3 b0 03 bcs $395ad8 BCS set_src_path -.395ad5 82 a1 fe brl $395979 BRL IF_PASSFAILURE ; If failed: pass the failure up the chain -.395ad8 set_src_path -.395ad8 c2 30 rep #$30 REP #$30 ; set A&X long -.395ada a0 02 00 ldy #$0002 LDY #FILEDESC.PATH ; Set the source path -.395add a5 44 lda $0364 LDA @b DOS_STR1_PTR -.395adf 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.395ae1 c8 iny INY -.395ae2 c8 iny INY -.395ae3 a5 46 lda $0366 LDA @b DOS_STR1_PTR+2 -.395ae5 97 20 sta [$0340],y STA [DOS_FD_PTR],Y -.395ae7 alloc_dest -.395ae7 c2 30 rep #$30 REP #$30 ; set A&X long -.395ae9 a5 20 lda $0340 LDA @b DOS_FD_PTR ; set DOS_SRC_PTR to the file descriptor pointer -.395aeb 85 30 sta $0350 STA @b DOS_SRC_PTR -.395aed a5 22 lda $0342 LDA @b DOS_FD_PTR+2 -.395aef 85 32 sta $0352 STA @b DOS_SRC_PTR+2 -.395af1 22 18 5a 39 jsl $395a18 JSL IF_ALLOCFD ; Allocate an FD for the destination -.395af5 b0 0f bcs $395b06 BCS set_paths ; If everything is ok... start setting the paths -.395af7 a5 30 lda $0350 err_free_src_fd LDA @b DOS_SRC_PTR ; Get the source file descriptor pointer -.395af9 85 20 sta $0340 STA @b DOS_FD_PTR -.395afb a5 32 lda $0352 LDA @b DOS_SRC_PTR+2 -.395afd 85 22 sta $0342 STA @b DOS_FD_PTR+2 -.395aff 22 6c 5a 39 jsl $395a6c JSL IF_FREEFD ; And free it -.395b03 82 73 fe brl $395979 BRL IF_PASSFAILURE ; Pass the failure up the chain -.395b06 set_paths -.395b06 c2 30 rep #$30 REP #$30 ; set A&X long -.395b08 a5 20 lda $0340 LDA @b DOS_FD_PTR ; Set DOS_DST_PTR to the file descriptor pointer for the destination -.395b0a 85 34 sta $0354 STA @b DOS_DST_PTR -.395b0c a5 22 lda $0342 LDA @b DOS_FD_PTR+2 -.395b0e 85 36 sta $0356 STA @b DOS_DST_PTR+2 -.395b10 a0 02 00 ldy #$0002 LDY #FILEDESC.PATH ; Set the destination path -.395b13 a5 48 lda $0368 LDA @b DOS_STR2_PTR -.395b15 97 34 sta [$0354],y STA [DOS_DST_PTR],Y -.395b17 c8 iny INY -.395b18 c8 iny INY -.395b19 a5 4a lda $036a LDA @b DOS_STR2_PTR+2 -.395b1b 97 34 sta [$0354],y STA [DOS_DST_PTR],Y -.395b1d a5 30 lda $0350 LDA @b DOS_SRC_PTR ; Get the source file descriptor pointer -.395b1f 85 20 sta $0340 STA @b DOS_FD_PTR -.395b21 a5 32 lda $0352 LDA @b DOS_SRC_PTR+2 -.395b23 85 22 sta $0342 STA @b DOS_FD_PTR+2 -.395b25 22 f0 10 00 jsl $0010f0 JSL F_OPEN ; Try to open the file -.395b29 b0 0f bcs $395b3a BCS src_open ; If success, work with the openned file -.395b2b a5 34 lda $0354 err_free_dst_fd LDA @b DOS_DST_PTR ; Get the destination file descriptor pointer -.395b2d 85 20 sta $0340 STA @b DOS_FD_PTR -.395b2f a5 36 lda $0356 LDA @b DOS_DST_PTR+2 -.395b31 85 22 sta $0342 STA @b DOS_FD_PTR+2 -.395b33 22 6c 5a 39 jsl $395a6c JSL IF_FREEFD ; And free it -.395b37 82 bd ff brl $395af7 BRL err_free_src_fd ; Free the source file descriptor -.395b3a a0 12 00 ldy #$0012 src_open LDY #FILEDESC.SIZE ; destination file size := source file size -.395b3d b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y -.395b3f 97 34 sta [$0354],y STA [DOS_DST_PTR],Y -.395b41 c8 iny INY -.395b42 c8 iny INY -.395b43 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y -.395b45 97 34 sta [$0354],y STA [DOS_DST_PTR],Y -.395b47 22 90 5a 39 jsl $395a90 JSL DOS_SRC2DST ; Copy the first sector's worth of data -.395b4b a5 34 lda $0354 LDA @b DOS_DST_PTR ; Get the destination file descriptor pointer -.395b4d 85 20 sta $0340 STA @b DOS_FD_PTR -.395b4f a5 36 lda $0356 LDA @b DOS_DST_PTR+2 -.395b51 85 22 sta $0342 STA @b DOS_FD_PTR+2 -.395b53 22 f4 10 00 jsl $0010f4 JSL F_CREATE ; Attempt to create the file -.395b57 b0 0f bcs $395b68 BCS read_next ; If sucessful, try to get the next cluster -.395b59 a5 30 lda $0350 err_src_close LDA @b DOS_SRC_PTR ; Get the source file descriptor pointer -.395b5b 85 20 sta $0340 STA @b DOS_FD_PTR -.395b5d a5 32 lda $0352 LDA @b DOS_SRC_PTR+2 -.395b5f 85 22 sta $0342 STA @b DOS_FD_PTR+2 -.395b61 22 f8 10 00 jsl $0010f8 JSL F_CLOSE ; Close the source file (maybe not really necessary) -.395b65 82 c3 ff brl $395b2b BRL err_free_dst_fd ; Free the file descriptors and return an error -.395b68 read_next -.395b68 a5 30 lda $0350 LDA @b DOS_SRC_PTR ; Get the source file descriptor pointer -.395b6a 85 20 sta $0340 STA @b DOS_FD_PTR -.395b6c a5 32 lda $0352 LDA @b DOS_SRC_PTR+2 -.395b6e 85 22 sta $0342 STA @b DOS_FD_PTR+2 -.395b70 22 00 11 00 jsl $001100 JSL F_READ ; Attempt to read the next sector of the source -.395b74 b0 19 bcs $395b8f BCS copy2dest ; If successful, copy the sector -.395b76 e2 20 sep #$20 SEP #$20 ; set A short -.395b78 a5 0e lda $032e LDA @b DOS_STATUS -.395b7a c9 0a cmp #$0a CMP #DOS_ERR_NOCLUSTER ; Are there no more clusters in the source file? -.395b7c f0 32 beq $395bb0 BEQ file_copied ; Yes: we're done copying -.395b7e err_dest_close -.395b7e c2 20 rep #$20 REP #$20 ; set A long -.395b80 a5 34 lda $0354 LDA @b DOS_DST_PTR ; Get the destination file descriptor pointer -.395b82 85 20 sta $0340 STA @b DOS_FD_PTR -.395b84 a5 36 lda $0356 LDA @b DOS_DST_PTR+2 -.395b86 85 22 sta $0342 STA @b DOS_FD_PTR+2 -.395b88 22 f8 10 00 jsl $0010f8 JSL F_CLOSE ; Attempt to close the destination -.395b8c 82 ca ff brl $395b59 BRL err_src_close ; Close the source and throw an error -.395b8f copy2dest -.395b8f 22 90 5a 39 jsl $395a90 JSL DOS_SRC2DST ; Copy the source sector to the destination sector -.395b93 a0 06 00 ldy #$0006 LDY #FILEDESC.CLUSTER ; destination sector cluster ID := 0 to append -.395b96 a9 00 00 lda #$0000 LDA #0 -.395b99 97 34 sta [$0354],y STA [DOS_DST_PTR],Y -.395b9b c8 iny INY -.395b9c c8 iny INY -.395b9d 97 34 sta [$0354],y STA [DOS_DST_PTR],Y -.395b9f a5 34 lda $0354 LDA @b DOS_DST_PTR ; Get the destination file descriptor pointer -.395ba1 85 20 sta $0340 STA @b DOS_FD_PTR -.395ba3 a5 36 lda $0356 LDA @b DOS_DST_PTR+2 -.395ba5 85 22 sta $0342 STA @b DOS_FD_PTR+2 -.395ba7 22 fc 10 00 jsl $0010fc JSL F_WRITE ; Attempt to write the destionation sector to the disk -.395bab 90 d1 bcc $395b7e BCC err_dest_close ; If error: close all files and throw the error -.395bad 82 b8 ff brl $395b68 BRL read_next ; Otherwise: repeat the loop -.395bb0 file_copied -.395bb0 c2 20 rep #$20 REP #$20 ; set A long -.395bb2 a5 34 lda $0354 LDA @b DOS_DST_PTR ; Get the destination file descriptor pointer -.395bb4 85 20 sta $0340 STA @b DOS_FD_PTR -.395bb6 a5 36 lda $0356 LDA @b DOS_DST_PTR+2 -.395bb8 85 22 sta $0342 STA @b DOS_FD_PTR+2 -.395bba 22 f8 10 00 jsl $0010f8 JSL F_CLOSE ; Close the destination -.395bbe a5 30 lda $0350 LDA @b DOS_SRC_PTR ; Get the source file descriptor pointer -.395bc0 85 20 sta $0340 STA @b DOS_FD_PTR -.395bc2 a5 32 lda $0352 LDA @b DOS_SRC_PTR+2 -.395bc4 85 22 sta $0342 STA @b DOS_FD_PTR+2 -.395bc6 22 f8 10 00 jsl $0010f8 JSL F_CLOSE ; Close the source -.395bca 82 b3 fd brl $395980 BRL IF_SUCCESS +.3953db DOS_TEST +.3953db 8b phb PHB +.3953dc 0b phd PHD +.3953dd 08 php PHP +.3953de 48 pha PHA ; begin setdbr macro +.3953df 08 php PHP +.3953e0 e2 20 sep #$20 SEP #$20 ; set A short +.3953e2 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.3953e4 48 pha PHA +.3953e5 ab plb PLB +.3953e6 28 plp PLP +.3953e7 68 pla PLA ; end setdbr macro +.3953e8 48 pha PHA ; begin setdp macro +.3953e9 08 php PHP +.3953ea c2 20 rep #$20 REP #$20 ; set A long +.3953ec a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.3953ef 5b tcd TCD +.3953f0 28 plp PLP +.3953f1 68 pla PLA ; end setdp macro +.3953f2 c2 30 rep #$30 REP #$30 ; set A&X long +.3953f4 a9 1a 54 lda #$541a LDA #<>src_file +.3953f7 8f 64 03 00 sta $000364 STA @l DOS_STR1_PTR +.3953fb a9 39 00 lda #$0039 LDA #`src_file +.3953fe 8f 66 03 00 sta $000366 STA @l DOS_STR1_PTR+2 +.395402 a9 27 54 lda #$5427 LDA #<>dst_file +.395405 8f 68 03 00 sta $000368 STA @l DOS_STR2_PTR +.395409 a9 39 00 lda #$0039 LDA #`dst_file +.39540c 8f 6a 03 00 sta $00036a STA @l DOS_STR2_PTR+2 +.395410 22 bb 5a 39 jsl $395abb JSL IF_COPY +.395414 b0 00 bcs $395416 BCS done +.395416 28 plp done PLP +.395417 2b pld PLD +.395418 ab plb PLB +.395419 6b rtl RTL +>39541a 40 73 3a 68 65 6c 6c 6f src_file .null "@s:hello.bas" +>395422 2e 62 61 73 00 +>395427 40 73 3a 68 65 6c 6c 6f dst_file .null "@s:hello2.bas" +>39542f 32 2e 62 61 73 00 +.395435 IF_OPEN +.395435 da phx PHX +.395436 5a phy PHY +.395437 0b phd PHD +.395438 8b phb PHB +.395439 08 php PHP +.39543a 48 pha PHA ; begin setdbr macro +.39543b 08 php PHP +.39543c e2 20 sep #$20 SEP #$20 ; set A short +.39543e a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.395440 48 pha PHA +.395441 ab plb PLB +.395442 28 plp PLP +.395443 68 pla PLA ; end setdbr macro +.395444 48 pha PHA ; begin setdp macro +.395445 08 php PHP +.395446 c2 20 rep #$20 REP #$20 ; set A long +.395448 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.39544b 5b tcd TCD +.39544c 28 plp PLP +.39544d 68 pla PLA ; end setdp macro +.39544e e2 20 sep #$20 SEP #$20 ; set A short +.395450 a0 00 00 ldy #$0000 LDY #FILEDESC.STATUS ; Get the status to make sure a open is ok +.395453 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395455 89 38 bit #$38 BIT #FD_STAT_OPEN +.395457 f0 05 beq $39545e BEQ ok_to_open +.395459 a9 0f lda #$0f LDA #DOS_ERR_OPEN ; If already open: throw an error +.39545b 82 1c 05 brl $39597a BRL IF_FAILURE +.39545e 22 7c 53 39 jsl $39537c ok_to_open JSL DOS_COPYPATH ; Copy the path to the path buffer +.395462 22 d2 49 39 jsl $3949d2 JSL DOS_FINDFILE ; Attempt to find the file +.395466 b0 03 bcs $39546b BCS is_found ; If OK: we found the file +.395468 82 13 05 brl $39597e BRL IF_PASSFAILURE ; Otherwise: pass the failure up the chain +.39546b is_found +.39546b e2 20 sep #$20 SEP #$20 ; set A short +.39546d a0 01 00 ldy #$0001 LDY #FILEDESC.DEV ; Set the device in the file descriptor +.395470 a5 01 lda $0321 LDA BIOS_DEV +.395472 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395474 c2 20 rep #$20 REP #$20 ; set A long +.395476 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER ; Set the buffer point to the one provided in the file +.395479 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.39547b 85 1c sta $033c STA DOS_BUFF_PTR +.39547d c8 iny INY +.39547e c8 iny INY +.39547f b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395481 85 1e sta $033e STA DOS_BUFF_PTR+2 +.395483 22 ec 47 39 jsl $3947ec JSL DOS_GETCLUSTER ; Attempt to load the cluster +.395487 b0 03 bcs $39548c BCS read_cluster +.395489 82 f2 04 brl $39597e BRL IF_PASSFAILURE +.39548c a0 0a 00 ldy #$000a read_cluster LDY #FILEDESC.FIRST_CLUSTER ; Set the first cluster in the file descriptor +.39548f a5 10 lda $0330 LDA DOS_CLUS_ID +.395491 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395493 c8 iny INY +.395494 c8 iny INY +.395495 a5 12 lda $0332 LDA DOS_CLUS_ID+2 +.395497 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395499 a0 06 00 ldy #$0006 LDY #FILEDESC.CLUSTER ; Set the current cluster in the file descriptor +.39549c a5 10 lda $0330 LDA DOS_CLUS_ID +.39549e 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3954a0 c8 iny INY +.3954a1 c8 iny INY +.3954a2 a5 12 lda $0332 LDA DOS_CLUS_ID+2 +.3954a4 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3954a6 a0 1c 00 ldy #$001c LDY #DIRENTRY.SIZE ; Copy the filesize from the directory entry to the file descriptor +.3954a9 b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y +.3954ab a0 12 00 ldy #$0012 LDY #FILEDESC.SIZE +.3954ae 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3954b0 a0 1e 00 ldy #$001e LDY #DIRENTRY.SIZE+2 +.3954b3 b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y +.3954b5 a0 14 00 ldy #$0014 LDY #FILEDESC.SIZE+2 +.3954b8 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3954ba e2 20 sep #$20 SEP #$20 ; set A short +.3954bc a0 00 00 ldy #$0000 LDY #FILEDESC.STATUS ; Mark file as open and readable +.3954bf a9 39 lda #$39 LDA #FD_STAT_OPEN | FD_STAT_READ +.3954c1 17 20 ora [$0340],y ORA [DOS_FD_PTR],Y +.3954c3 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3954c5 82 bd 04 brl $395985 BRL IF_SUCCESS +.3954c8 IF_CREATE +.3954c8 da phx PHX +.3954c9 5a phy PHY +.3954ca 0b phd PHD +.3954cb 8b phb PHB +.3954cc 08 php PHP +.3954cd 48 pha PHA ; begin setdbr macro +.3954ce 08 php PHP +.3954cf e2 20 sep #$20 SEP #$20 ; set A short +.3954d1 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.3954d3 48 pha PHA +.3954d4 ab plb PLB +.3954d5 28 plp PLP +.3954d6 68 pla PLA ; end setdbr macro +.3954d7 48 pha PHA ; begin setdp macro +.3954d8 08 php PHP +.3954d9 c2 20 rep #$20 REP #$20 ; set A long +.3954db a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.3954de 5b tcd TCD +.3954df 28 plp PLP +.3954e0 68 pla PLA ; end setdp macro +.3954e1 22 4f 52 39 jsl $39524f JSL DOS_CREATE ; Attempt to create the file +.3954e5 90 18 bcc $3954ff BCC pass_failure ; If it fails: pass the failure up the chain +.3954e7 c2 30 rep #$30 REP #$30 ; set A&X long +.3954e9 a0 06 00 ldy #$0006 LDY #FILEDESC.CLUSTER ; Sets the current cluster to 0 to make sure the next write appends +.3954ec a9 00 00 lda #$0000 LDA #0 +.3954ef 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3954f1 c8 iny INY +.3954f2 c8 iny INY +.3954f3 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.3954f5 e2 20 sep #$20 SEP #$20 ; set A short +.3954f7 a0 00 00 ldy #$0000 LDY #FILEDESC.STATUS +.3954fa a9 3a lda #$3a LDA #FD_STAT_OPEN | FD_STAT_WRITE ; Set the file to open and APPEND only +.3954fc 82 86 04 brl $395985 BRL IF_SUCCESS +.3954ff 82 78 04 brl $39597a pass_failure BRL IF_FAILURE +.395502 IF_CLOSE +.395502 da phx PHX +.395503 5a phy PHY +.395504 0b phd PHD +.395505 8b phb PHB +.395506 08 php PHP +.395507 48 pha PHA ; begin setdbr macro +.395508 08 php PHP +.395509 e2 20 sep #$20 SEP #$20 ; set A short +.39550b a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.39550d 48 pha PHA +.39550e ab plb PLB +.39550f 28 plp PLP +.395510 68 pla PLA ; end setdbr macro +.395511 48 pha PHA ; begin setdp macro +.395512 08 php PHP +.395513 c2 20 rep #$20 REP #$20 ; set A long +.395515 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395518 5b tcd TCD +.395519 28 plp PLP +.39551a 68 pla PLA ; end setdp macro +.39551b e2 20 sep #$20 SEP #$20 ; set A short +.39551d a0 00 00 ldy #$0000 LDY #FILEDESC.STATUS ; Check to see if we were writing the file +.395520 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395522 89 02 bit #$02 BIT #FD_STAT_WRITE +.395524 f0 09 beq $39552f BEQ set_flag ; No, just mark it closed +.395526 22 9b 55 39 jsl $39559b JSL IF_WRITE ; Attempt to write the cluster +.39552a b0 03 bcs $39552f BCS set_flag +.39552c 82 4f 04 brl $39597e BRL IF_PASSFAILURE ; If there was a problem, pass it up the chain +.39552f 22 71 5a 39 jsl $395a71 set_flag JSL IF_FREEFD ; Free the file descriptor as well +.395533 82 4f 04 brl $395985 BRL IF_SUCCESS +.395536 IF_READ +.395536 da phx PHX +.395537 5a phy PHY +.395538 0b phd PHD +.395539 8b phb PHB +.39553a 08 php PHP +.39553b 48 pha PHA ; begin setdbr macro +.39553c 08 php PHP +.39553d e2 20 sep #$20 SEP #$20 ; set A short +.39553f a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.395541 48 pha PHA +.395542 ab plb PLB +.395543 28 plp PLP +.395544 68 pla PLA ; end setdbr macro +.395545 48 pha PHA ; begin setdp macro +.395546 08 php PHP +.395547 c2 20 rep #$20 REP #$20 ; set A long +.395549 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.39554c 5b tcd TCD +.39554d 28 plp PLP +.39554e 68 pla PLA ; end setdp macro +.39554f c2 10 rep #$10 REP #$10 ; set X long +.395551 e2 20 sep #$20 SEP #$20 ; set A short +.395553 get_dev +.395553 e2 20 sep #$20 SEP #$20 ; set A short +.395555 a0 01 00 ldy #$0001 LDY #FILEDESC.DEV ; Get the device number from the file descriptor +.395558 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.39555a 85 01 sta $0321 STA BIOS_DEV +.39555c 22 54 45 39 jsl $394554 JSL DOS_MOUNT ; Make sure the device is mounted (if needed) +.395560 c2 20 rep #$20 REP #$20 ; set A long +.395562 a0 06 00 ldy #$0006 LDY #FILEDESC.CLUSTER ; Get the file's current cluster +.395565 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395567 85 10 sta $0330 STA DOS_CLUS_ID +.395569 c8 iny INY +.39556a c8 iny INY +.39556b b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.39556d 85 12 sta $0332 STA DOS_CLUS_ID+2 +.39556f 22 fc 4b 39 jsl $394bfc JSL NEXTCLUSTER ; Find the next cluster of the file +.395573 90 13 bcc $395588 BCC pass_failure ; If not OK: pass the failure up the chain +.395575 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER ; Get the pointer to the file's cluster buffer +.395578 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.39557a 85 1c sta $033c STA DOS_BUFF_PTR +.39557c c8 iny INY +.39557d c8 iny INY +.39557e b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395580 85 1e sta $033e STA DOS_BUFF_PTR+2 +.395582 22 ec 47 39 jsl $3947ec JSL DOS_GETCLUSTER ; Get the cluster +.395586 b0 03 bcs $39558b BCS ret_success ; If ok: return success +.395588 pass_failure +.395588 82 f3 03 brl $39597e BRL IF_PASSFAILURE ; Otherwise: bubble up the failure +.39558b a0 06 00 ldy #$0006 ret_success LDY #FILEDESC.CLUSTER ; Save the new cluster as the file's current cluster +.39558e a5 10 lda $0330 LDA DOS_CLUS_ID +.395590 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395592 c8 iny INY +.395593 c8 iny INY +.395594 a5 12 lda $0332 LDA DOS_CLUS_ID+2 +.395596 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395598 82 ea 03 brl $395985 BRL IF_SUCCESS +.39559b IF_WRITE +.39559b da phx PHX +.39559c 5a phy PHY +.39559d 0b phd PHD +.39559e 8b phb PHB +.39559f 08 php PHP +.3955a0 48 pha PHA ; begin setdbr macro +.3955a1 08 php PHP +.3955a2 e2 20 sep #$20 SEP #$20 ; set A short +.3955a4 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.3955a6 48 pha PHA +.3955a7 ab plb PLB +.3955a8 28 plp PLP +.3955a9 68 pla PLA ; end setdbr macro +.3955aa 48 pha PHA ; begin setdp macro +.3955ab 08 php PHP +.3955ac c2 20 rep #$20 REP #$20 ; set A long +.3955ae a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.3955b1 5b tcd TCD +.3955b2 28 plp PLP +.3955b3 68 pla PLA ; end setdp macro +.3955b4 c2 10 rep #$10 REP #$10 ; set X long +.3955b6 e2 20 sep #$20 SEP #$20 ; set A short +.3955b8 a0 01 00 ldy #$0001 get_dev LDY #FILEDESC.DEV ; Get the device number from the file descriptor +.3955bb b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3955bd 85 01 sta $0321 STA BIOS_DEV +.3955bf 22 54 45 39 jsl $394554 JSL DOS_MOUNT ; Make sure the device is mounted (if needed) +.3955c3 c2 20 rep #$20 REP #$20 ; set A long +.3955c5 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER ; Get the pointer to the file's cluster buffer +.3955c8 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3955ca 85 1c sta $033c STA DOS_BUFF_PTR +.3955cc c8 iny INY +.3955cd c8 iny INY +.3955ce b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3955d0 85 1e sta $033e STA DOS_BUFF_PTR+2 +.3955d2 a0 06 00 ldy #$0006 LDY #FILEDESC.CLUSTER ; Get the file's current cluster +.3955d5 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3955d7 85 10 sta $0330 STA DOS_CLUS_ID +.3955d9 c8 iny INY +.3955da c8 iny INY +.3955db b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3955dd 85 12 sta $0332 STA DOS_CLUS_ID+2 +.3955df d0 1a bne $3955fb BNE rewrite_cluster ; If the cluster ID <> 0, overwrite it +.3955e1 a5 10 lda $0330 LDA DOS_CLUS_ID +.3955e3 d0 16 bne $3955fb BNE rewrite_cluster +.3955e5 a0 0a 00 ldy #$000a LDY #FILEDESC.FIRST_CLUSTER ; Get the file's first cluster +.3955e8 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3955ea 85 10 sta $0330 STA DOS_CLUS_ID +.3955ec c8 iny INY +.3955ed c8 iny INY +.3955ee b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3955f0 85 12 sta $0332 STA DOS_CLUS_ID+2 +.3955f2 22 1d 50 39 jsl $39501d JSL DOS_APPENDCLUS ; Append the cluster +.3955f6 b0 0c bcs $395604 BCS ret_success ; If OK: return success +.3955f8 82 83 03 brl $39597e BRL IF_PASSFAILURE ; Otherwise: bubble up the failure +.3955fb 22 29 48 39 jsl $394829 rewrite_cluster JSL DOS_PUTCLUSTER ; Over-write the cluster +.3955ff b0 03 bcs $395604 BCS ret_success ; If ok: return success +.395601 82 7a 03 brl $39597e pass_failure BRL IF_PASSFAILURE ; Otherwise: bubble up the failure +.395604 82 7e 03 brl $395985 ret_success BRL IF_SUCCESS +.395607 IF_DIROPEN +.395607 da phx PHX +.395608 5a phy PHY +.395609 0b phd PHD +.39560a 8b phb PHB +.39560b 08 php PHP +.39560c 48 pha PHA ; begin setdbr macro +.39560d 08 php PHP +.39560e e2 20 sep #$20 SEP #$20 ; set A short +.395610 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.395612 48 pha PHA +.395613 ab plb PLB +.395614 28 plp PLP +.395615 68 pla PLA ; end setdbr macro +.395616 48 pha PHA ; begin setdp macro +.395617 08 php PHP +.395618 c2 20 rep #$20 REP #$20 ; set A long +.39561a a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.39561d 5b tcd TCD +.39561e 28 plp PLP +.39561f 68 pla PLA ; end setdp macro +.395620 c2 30 rep #$30 REP #$30 ; set A&X long +.395622 22 7c 53 39 jsl $39537c JSL DOS_COPYPATH ; Copy the path from the file descriptor to the path buffer +.395626 22 3a 49 39 jsl $39493a JSL DOS_PARSE_PATH ; Parse the path +.39562a 22 54 45 39 jsl $394554 JSL DOS_MOUNT ; Make sure we've mounted the SDC. +.39562e b0 03 bcs $395633 BCS get_root_dir ; If successful: get the root directory +.395630 82 4b 03 brl $39597e BRL IF_PASSFAILURE ; Otherwise: pass the error up the chain +.395633 get_root_dir +.395633 c2 30 rep #$30 REP #$30 ; set A&X long +.395635 22 09 42 39 jsl $394209 JSL DOS_DIROPEN +.395639 b0 03 bcs $39563e BCS success +.39563b 82 40 03 brl $39597e BRL IF_PASSFAILURE +.39563e 82 44 03 brl $395985 success BRL IF_SUCCESS +.395641 IF_DIRNEXT +.395641 5c a3 42 39 jmp $3942a3 JML DOS_DIRNEXT +.395645 IF_DELETE +.395645 da phx PHX +.395646 5a phy PHY +.395647 0b phd PHD +.395648 8b phb PHB +.395649 08 php PHP +.39564a 48 pha PHA ; begin setdbr macro +.39564b 08 php PHP +.39564c e2 20 sep #$20 SEP #$20 ; set A short +.39564e a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.395650 48 pha PHA +.395651 ab plb PLB +.395652 28 plp PLP +.395653 68 pla PLA ; end setdbr macro +.395654 48 pha PHA ; begin setdp macro +.395655 08 php PHP +.395656 c2 20 rep #$20 REP #$20 ; set A long +.395658 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.39565b 5b tcd TCD +.39565c 28 plp PLP +.39565d 68 pla PLA ; end setdp macro +.39565e c2 30 rep #$30 REP #$30 ; set A&X long +.395660 22 d2 49 39 jsl $3949d2 JSL DOS_FINDFILE +.395664 b0 03 bcs $395669 BCS get_first_clus +.395666 82 15 03 brl $39597e BRL IF_PASSFAILURE +.395669 get_first_clus +.395669 a0 1a 00 ldy #$001a LDY #DIRENTRY.CLUSTER_L +.39566c b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y +.39566e 85 10 sta $0330 STA DOS_CLUS_ID +.395670 a0 14 00 ldy #$0014 LDY #DIRENTRY.CLUSTER_H +.395673 b7 18 lda [$0338],y LDA [DOS_DIR_PTR],Y +.395675 85 12 sta $0332 STA DOS_CLUS_ID+2 +.395677 a5 10 lda $0330 LDA DOS_CLUS_ID +.395679 8d 2a a0 sta $38a02a STA DOS_CURR_CLUS +.39567c a5 12 lda $0332 LDA DOS_CLUS_ID+2 +.39567e 8d 2c a0 sta $38a02c STA DOS_CURR_CLUS+2 +.395681 22 fc 4b 39 jsl $394bfc del_loop JSL NEXTCLUSTER +.395685 90 2f bcc $3956b6 BCC del_one +.395687 a5 10 lda $0330 LDA DOS_CLUS_ID +.395689 8d 2e a0 sta $38a02e STA DOS_NEXT_CLUS +.39568c a5 12 lda $0332 LDA DOS_CLUS_ID+2 +.39568e 8d 30 a0 sta $38a030 STA DOS_NEXT_CLUS+2 +.395691 ad 2a a0 lda $38a02a LDA DOS_CURR_CLUS +.395694 85 10 sta $0330 STA DOS_CLUS_ID +.395696 ad 2c a0 lda $38a02c LDA DOS_CURR_CLUS+2 +.395699 85 12 sta $0332 STA DOS_CLUS_ID+2 +.39569b 22 dd 4f 39 jsl $394fdd JSL DELCLUSTER32 +.39569f b0 03 bcs $3956a4 BCS go_next +.3956a1 82 da 02 brl $39597e BRL IF_PASSFAILURE +.3956a4 go_next +.3956a4 ad 2e a0 lda $38a02e LDA DOS_NEXT_CLUS +.3956a7 85 10 sta $0330 STA DOS_CLUS_ID +.3956a9 8d 2a a0 sta $38a02a STA DOS_CURR_CLUS +.3956ac ad 30 a0 lda $38a030 LDA DOS_NEXT_CLUS+2 +.3956af 85 12 sta $0332 STA DOS_CLUS_ID+2 +.3956b1 8d 2c a0 sta $38a02c STA DOS_CURR_CLUS+2 +.3956b4 80 cb bra $395681 BRA del_loop +.3956b6 del_one +.3956b6 ad 2a a0 lda $38a02a LDA DOS_CURR_CLUS +.3956b9 85 10 sta $0330 STA DOS_CLUS_ID +.3956bb ad 2c a0 lda $38a02c LDA DOS_CURR_CLUS+2 +.3956be 85 12 sta $0332 STA DOS_CLUS_ID+2 +.3956c0 22 37 4f 39 jsl $394f37 JSL DELCLUSTER +.3956c4 b0 03 bcs $3956c9 BCS free_dir_entry +.3956c6 82 b5 02 brl $39597e BRL IF_PASSFAILURE +.3956c9 free_dir_entry +.3956c9 e2 20 sep #$20 SEP #$20 ; set A short +.3956cb a0 00 00 ldy #$0000 LDY #DIRENTRY.SHORTNAME ; Flag the directory entry as deleted +.3956ce a9 e5 lda #$e5 LDA #DOS_DIR_ENT_UNUSED +.3956d0 97 18 sta [$0338],y STA [DOS_DIR_PTR],Y +.3956d2 22 22 44 39 jsl $394422 JSL DOS_DIRWRITE ; Write the directory entry back +.3956d6 b0 03 bcs $3956db BCS ret_success +.3956d8 82 a3 02 brl $39597e BRL IF_PASSFAILURE +.3956db 82 a7 02 brl $395985 ret_success BRL IF_SUCCESS +.3956de IF_DIRREAD +.3956de da phx PHX +.3956df 5a phy PHY +.3956e0 0b phd PHD +.3956e1 8b phb PHB +.3956e2 08 php PHP +.3956e3 48 pha PHA ; begin setdbr macro +.3956e4 08 php PHP +.3956e5 e2 20 sep #$20 SEP #$20 ; set A short +.3956e7 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.3956e9 48 pha PHA +.3956ea ab plb PLB +.3956eb 28 plp PLP +.3956ec 68 pla PLA ; end setdbr macro +.3956ed 48 pha PHA ; begin setdp macro +.3956ee 08 php PHP +.3956ef c2 20 rep #$20 REP #$20 ; set A long +.3956f1 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.3956f4 5b tcd TCD +.3956f5 28 plp PLP +.3956f6 68 pla PLA ; end setdp macro +.3956f7 c2 30 rep #$30 REP #$30 ; set A&X long +.3956f9 22 d2 49 39 jsl $3949d2 JSL DOS_FINDFILE +.3956fd b0 03 bcs $395702 BCS success +.3956ff 82 78 02 brl $39597a BRL IF_FAILURE +.395702 82 80 02 brl $395985 success BRL IF_SUCCESS +.395705 IF_DIRWRITE +.395705 5c 22 44 39 jmp $394422 JML DOS_DIRWRITE +.395709 IF_LOAD +.395709 da phx PHX +.39570a 5a phy PHY +.39570b 0b phd PHD +.39570c 8b phb PHB +.39570d 08 php PHP +.39570e 48 pha PHA ; begin setdbr macro +.39570f 08 php PHP +.395710 e2 20 sep #$20 SEP #$20 ; set A short +.395712 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.395714 48 pha PHA +.395715 ab plb PLB +.395716 28 plp PLP +.395717 68 pla PLA ; end setdbr macro +.395718 48 pha PHA ; begin setdp macro +.395719 08 php PHP +.39571a c2 20 rep #$20 REP #$20 ; set A long +.39571c a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.39571f 5b tcd TCD +.395720 28 plp PLP +.395721 68 pla PLA ; end setdp macro +.395722 c2 30 rep #$30 REP #$30 ; set A&X long +.395724 22 35 54 39 jsl $395435 JSL IF_OPEN +.395728 b0 03 bcs $39572d BCS setup ; If success: start setting things up +.39572a 82 51 02 brl $39597e BRL IF_PASSFAILURE ; Otherwise: pass the failure up the chain +.39572d setup +.39572d c2 20 rep #$20 REP #$20 ; set A long +.39572f a0 12 00 ldy #$0012 LDY #FILEDESC.SIZE ; Record the size of the file in DOS_FILE_SIZE +.395732 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395734 85 2c sta $034c STA DOS_FILE_SIZE +.395736 c8 iny INY +.395737 c8 iny INY +.395738 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.39573a 85 2e sta $034e STA DOS_FILE_SIZE+2 +.39573c a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER ; Set up the source pointer +.39573f b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395741 85 30 sta $0350 STA DOS_SRC_PTR +.395743 c8 iny INY +.395744 c8 iny INY +.395745 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395747 85 32 sta $0352 STA DOS_SRC_PTR+2 +.395749 a5 36 lda $0356 LDA DOS_DST_PTR+2 ; Is there a destination address in RAM? +.39574b c9 40 00 cmp #$0040 CMP #$0040 +.39574e b0 04 bcs $395754 BGE load_by_type ; No: try to load it by type +.395750 5c 2f 58 39 jmp $39582f JML IF_LOADRAW ; Otherwise, load it to the supplied destination +.395754 a0 08 00 ldy #$0008 load_by_type LDY #8 ; Point to the first extension byte +.395757 a2 00 00 ldx #$0000 LDX #0 ; and the first byte of the table +.39575a type_loop +.39575a e2 20 sep #$20 SEP #$20 ; set A short +.39575c bf a0 57 39 lda $3957a0,x LDA LOAD_TYPE_TABLE,X ; Get 1st extension character of the entry +.395760 f0 37 beq $395799 BEQ no_match ; If NULL... we didn't get a match +.395762 d9 3a a0 cmp $38a03a,y CMP DOS_SHORT_NAME,Y ; Get the character of the extension +.395765 d0 28 bne $39578f BNE next_entry ; If they don't match, try the next entry +.395767 bf a1 57 39 lda $3957a1,x LDA LOAD_TYPE_TABLE+1,X ; Get 2nd extension character of the entry +.39576b d9 3b a0 cmp $38a03b,y CMP DOS_SHORT_NAME+1,Y ; Get the 2nd character of the extension +.39576e d0 1f bne $39578f BNE next_entry ; If they don't match, try the next entry +.395770 bf a2 57 39 lda $3957a2,x LDA LOAD_TYPE_TABLE+2,X ; Get 3rd extension character of the entry +.395774 d9 3c a0 cmp $38a03c,y CMP DOS_SHORT_NAME+2,Y ; Get the 3rd character of the extension +.395777 d0 16 bne $39578f BNE next_entry ; If they don't match, try the next entry +.395779 c2 20 rep #$20 REP #$20 ; set A long +.39577b bf a3 57 39 lda $3957a3,x LDA LOAD_TYPE_TABLE+3,X ; Get the low word of the address +.39577f 85 28 sta $0348 STA DOS_TEMP ; Save it to the jump vector +.395781 e2 20 sep #$20 SEP #$20 ; set A short +.395783 bf a5 57 39 lda $3957a5,x LDA LOAD_TYPE_TABLE+5,X ; Get the high byte of the address +.395787 85 2a sta $034a STA DOS_TEMP+2 ; Save it to the jump vector +.395789 a2 00 00 ldx #$0000 LDX #0 +.39578c dc 48 03 jmp [$0348] JML [DOS_TEMP] ; Jump to the loading routine +.39578f next_entry +.39578f c2 30 rep #$30 REP #$30 ; set A&X long +.395791 8a txa TXA +.395792 18 clc CLC +.395793 69 06 00 adc #$0006 ADC #6 +.395796 aa tax TAX +.395797 80 c1 bra $39575a BRA type_loop ; And check it against the file +.395799 no_match +.395799 e2 20 sep #$20 SEP #$20 ; set A short +.39579b a9 11 lda #$11 LDA #DOS_ERR_NOEXEC ; Return an not-executable error +.39579d 82 da 01 brl $39597a BRL IF_FAILURE +>3957a0 50 47 58 LOAD_TYPE_TABLE .text "PGX" ; "PGX" --> IF_LOADPGX +>3957a3 a7 57 .word <>IF_LOADPGX +>3957a5 39 .byte `IF_LOADPGX +>3957a6 00 .byte 0 +.3957a7 IF_LOADPGX +.3957a7 c2 10 rep #$10 REP #$10 ; set X long +.3957a9 e2 20 sep #$20 SEP #$20 ; set A short +.3957ab a0 00 00 ldy #$0000 LDY #0 +.3957ae b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y ; Check for "PGX" signature +.3957b0 c9 50 cmp #$50 CMP #'P' +.3957b2 d0 15 bne $3957c9 BNE fail_sig ; If not found, fail +.3957b4 c8 iny INY +.3957b5 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y +.3957b7 c9 47 cmp #$47 CMP #'G' +.3957b9 d0 0e bne $3957c9 BNE fail_sig +.3957bb c8 iny INY +.3957bc b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y +.3957be c9 58 cmp #$58 CMP #'X' +.3957c0 d0 07 bne $3957c9 BNE fail_sig +.3957c2 c8 iny INY ; Check for CPU and version code ($01 for 65816) +.3957c3 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y +.3957c5 c9 01 cmp #$01 CMP #$01 +.3957c7 f0 17 beq $3957e0 BEQ get_dest ; All passes: go to get the destination address +.3957c9 a9 10 lda #$10 fail_sig LDA #DOS_ERR_PGXSIG ; Fail with a PGXSIG error code +.3957cb 22 7a 59 39 jsl $39597a JSL IF_FAILURE +.3957cf adjust_size +.3957cf c2 20 rep #$20 REP #$20 ; set A long +.3957d1 38 sec SEC ; Subtract the 8 bytes of the header from the file size +.3957d2 a5 2c lda $034c LDA DOS_FILE_SIZE +.3957d4 e9 08 00 sbc #$0008 SBC #8 +.3957d7 85 2c sta $034c STA DOS_FILE_SIZE +.3957d9 a5 2e lda $034e LDA DOS_FILE_SIZE+2 +.3957db e9 00 00 sbc #$0000 SBC #0 +.3957de 85 2e sta $034e STA DOS_FILE_SIZE+2 +.3957e0 get_dest +.3957e0 c2 20 rep #$20 REP #$20 ; set A long +.3957e2 c8 iny INY +.3957e3 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y ; Get low word of destination address +.3957e5 85 34 sta $0354 STA DOS_DST_PTR ; And save it to the destination pointer +.3957e7 85 3c sta $035c STA DOS_RUN_PTR ; And save it to the RUN pointer +.3957e9 c8 iny INY +.3957ea c8 iny INY +.3957eb b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y ; Get high word of destination address +.3957ed 85 36 sta $0356 STA DOS_DST_PTR+2 +.3957ef 85 3e sta $035e STA DOS_RUN_PTR+2 +.3957f1 c8 iny INY ; Point to the first data byte +.3957f2 c8 iny INY +.3957f3 copy_loop +.3957f3 e2 20 sep #$20 SEP #$20 ; set A short +.3957f5 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y ; Read a byte from the file +.3957f7 87 34 sta [$0354] STA [DOS_DST_PTR] ; Write it to the destination +.3957f9 c2 20 rep #$20 REP #$20 ; set A long +.3957fb e6 34 inc $0354 INC DOS_DST_PTR ; Move to the next destination location +.3957fd d0 02 bne $395801 BNE dec_file_size +.3957ff e6 36 inc $0356 INC DOS_DST_PTR+2 +.395801 38 sec dec_file_size SEC ; Count down the number of bytes to read +.395802 a5 2c lda $034c LDA DOS_FILE_SIZE +.395804 e9 01 00 sbc #$0001 SBC #1 +.395807 85 2c sta $034c STA DOS_FILE_SIZE +.395809 a5 2e lda $034e LDA DOS_FILE_SIZE+2 +.39580b e9 00 00 sbc #$0000 SBC #0 +.39580e 85 2e sta $034e STA DOS_FILE_SIZE+2 +.395810 a5 2c lda $034c LDA DOS_FILE_SIZE ; Are we at the end of the file? +.395812 d0 04 bne $395818 BNE next_byte +.395814 a5 2e lda $034e LDA DOS_FILE_SIZE+2 +.395816 f0 14 beq $39582c BEQ done ; Yes: we're done +.395818 c8 iny next_byte INY ; Otherwise, move to the next source location +.395819 cc 0e a0 cpy $38a00e CPY CLUSTER_SIZE ; Are we at the end of the cluster? +.39581c d0 d5 bne $3957f3 BNE copy_loop ; No: keep copying +.39581e 22 00 4d 39 jsl $394d00 JSL DOS_READNEXT ; Yes: Load the next cluster +.395822 b0 03 bcs $395827 BCS next_cluster +.395824 82 57 01 brl $39597e BRL IF_PASSFAILURE ; If failed: pass that up the chain +.395827 a0 00 00 ldy #$0000 next_cluster LDY #0 +.39582a 80 c7 bra $3957f3 BRA copy_loop ; Go back to copying +.39582c 82 56 01 brl $395985 done BRL IF_SUCCESS +.39582f IF_LOADRAW +.39582f c2 30 rep #$30 REP #$30 ; set A&X long +.395831 a0 00 00 ldy #$0000 copy_cluster LDY #0 +.395834 copy_loop +.395834 e2 20 sep #$20 SEP #$20 ; set A short +.395836 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y ; Copy byte from cluster to destination +.395838 97 34 sta [$0354],y STA [DOS_DST_PTR],Y +.39583a c2 20 rep #$20 REP #$20 ; set A long +.39583c 38 sec SEC ; Count down the number of bytes left +.39583d a5 2c lda $034c LDA DOS_FILE_SIZE +.39583f e9 01 00 sbc #$0001 SBC #1 +.395842 85 2c sta $034c STA DOS_FILE_SIZE +.395844 a5 2e lda $034e LDA DOS_FILE_SIZE+2 +.395846 e9 00 00 sbc #$0000 SBC #0 +.395849 85 2e sta $034e STA DOS_FILE_SIZE+2 +.39584b d0 04 bne $395851 BNE continue +.39584d a5 2c lda $034c LDA DOS_FILE_SIZE +.39584f f0 1b beq $39586c BEQ close_file ; If not: we're done +.395851 c8 iny continue INY +.395852 cc 0e a0 cpy $38a00e CPY CLUSTER_SIZE ; Are we done with the cluster? +.395855 d0 dd bne $395834 BNE copy_loop ; No: keep processing the bytes +.395857 18 clc CLC ; Advance the destination pointer to the next chunk of memory +.395858 a5 34 lda $0354 LDA DOS_DST_PTR +.39585a 6d 0e a0 adc $38a00e ADC CLUSTER_SIZE +.39585d 85 34 sta $0354 STA DOS_DST_PTR +.39585f a5 36 lda $0356 LDA DOS_DST_PTR+2 +.395861 69 00 00 adc #$0000 ADC #0 +.395864 85 36 sta $0356 STA DOS_DST_PTR+2 +.395866 22 36 55 39 jsl $395536 JSL IF_READ ; Yes: load the next cluster +.39586a b0 c5 bcs $395831 BCS copy_cluster ; And start copying it +.39586c close_file +.39586c 82 16 01 brl $395985 ret_success BRL IF_SUCCESS +.39586f IF_NULLBUFFER +.39586f 5a phy PHY +.395870 8b phb PHB +.395871 0b phd PHD +.395872 08 php PHP +.395873 48 pha PHA ; begin setdbr macro +.395874 08 php PHP +.395875 e2 20 sep #$20 SEP #$20 ; set A short +.395877 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.395879 48 pha PHA +.39587a ab plb PLB +.39587b 28 plp PLP +.39587c 68 pla PLA ; end setdbr macro +.39587d 48 pha PHA ; begin setdp macro +.39587e 08 php PHP +.39587f c2 20 rep #$20 REP #$20 ; set A long +.395881 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395884 5b tcd TCD +.395885 28 plp PLP +.395886 68 pla PLA ; end setdp macro +.395887 c2 30 rep #$30 REP #$30 ; set A&X long +.395889 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER +.39588c b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.39588e 85 28 sta $0348 STA DOS_TEMP +.395890 c8 iny INY +.395891 c8 iny INY +.395892 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395894 85 2a sta $034a STA DOS_TEMP+2 +.395896 a0 00 00 ldy #$0000 LDY #0 +.395899 a9 00 00 lda #$0000 LDA #0 +.39589c 97 28 sta [$0348],y loop STA [DOS_TEMP],Y +.39589e c8 iny INY +.39589f c8 iny INY +.3958a0 c0 00 02 cpy #$0200 CPY #DOS_SECTOR_SIZE +.3958a3 d0 f7 bne $39589c BNE loop +.3958a5 28 plp PLP +.3958a6 2b pld PLD +.3958a7 ab plb PLB +.3958a8 7a ply PLY +.3958a9 6b rtl RTL +.3958aa IF_COPY2BUFF +.3958aa 5a phy PHY +.3958ab 8b phb PHB +.3958ac 0b phd PHD +.3958ad 08 php PHP +.3958ae 48 pha PHA ; begin setdbr macro +.3958af 08 php PHP +.3958b0 e2 20 sep #$20 SEP #$20 ; set A short +.3958b2 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.3958b4 48 pha PHA +.3958b5 ab plb PLB +.3958b6 28 plp PLP +.3958b7 68 pla PLA ; end setdbr macro +.3958b8 48 pha PHA ; begin setdp macro +.3958b9 08 php PHP +.3958ba c2 20 rep #$20 REP #$20 ; set A long +.3958bc a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.3958bf 5b tcd TCD +.3958c0 28 plp PLP +.3958c1 68 pla PLA ; end setdp macro +.3958c2 c2 30 rep #$30 REP #$30 ; set A&X long +.3958c4 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER +.3958c7 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3958c9 85 28 sta $0348 STA DOS_TEMP +.3958cb c8 iny INY +.3958cc c8 iny INY +.3958cd b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.3958cf 85 2a sta $034a STA DOS_TEMP+2 +.3958d1 a0 00 00 ldy #$0000 LDY #0 +.3958d4 copy_loop +.3958d4 e2 20 sep #$20 SEP #$20 ; set A short +.3958d6 a7 30 lda [$0350] LDA [DOS_SRC_PTR] ; Copy a byte +.3958d8 97 28 sta [$0348],y STA [DOS_TEMP],Y +.3958da c2 20 rep #$20 REP #$20 ; set A long +.3958dc e6 30 inc $0350 INC DOS_SRC_PTR ; Advance the source pointer +.3958de d0 02 bne $3958e2 BNE adv_dest +.3958e0 e6 32 inc $0352 INC DOS_SRC_PTR+2 +.3958e2 c8 iny adv_dest INY ; Count it +.3958e3 c0 00 02 cpy #$0200 CPY #DOS_SECTOR_SIZE ; Have we reached the limit? +.3958e6 f0 0c beq $3958f4 BEQ done ; Yes: we're done +.3958e8 a5 30 lda $0350 LDA DOS_SRC_PTR ; Check if we copied the last byte +.3958ea c5 38 cmp $0358 CMP DOS_END_PTR +.3958ec d0 e6 bne $3958d4 BNE copy_loop ; No: keep copying +.3958ee a5 32 lda $0352 LDA DOS_SRC_PTR+2 +.3958f0 c5 3a cmp $035a CMP DOS_END_PTR+2 +.3958f2 d0 e0 bne $3958d4 BNE copy_loop +.3958f4 28 plp done PLP +.3958f5 2b pld PLD +.3958f6 ab plb PLB +.3958f7 7a ply PLY +.3958f8 6b rtl RTL +.3958f9 IF_SAVE +.3958f9 da phx PHX +.3958fa 5a phy PHY +.3958fb 0b phd PHD +.3958fc 8b phb PHB +.3958fd 08 php PHP +.3958fe 48 pha PHA ; begin setdbr macro +.3958ff 08 php PHP +.395900 e2 20 sep #$20 SEP #$20 ; set A short +.395902 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.395904 48 pha PHA +.395905 ab plb PLB +.395906 28 plp PLP +.395907 68 pla PLA ; end setdbr macro +.395908 48 pha PHA ; begin setdp macro +.395909 08 php PHP +.39590a c2 20 rep #$20 REP #$20 ; set A long +.39590c a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.39590f 5b tcd TCD +.395910 28 plp PLP +.395911 68 pla PLA ; end setdp macro +.395912 c2 30 rep #$30 REP #$30 ; set A&X long +.395914 a0 12 00 ldy #$0012 LDY #FILEDESC.SIZE ; DOS_FD_PTR->SIZE := DOS_END_PTR - DOS_SRC_PTR +.395917 38 sec SEC +.395918 a5 38 lda $0358 LDA DOS_END_PTR +.39591a e5 30 sbc $0350 SBC DOS_SRC_PTR +.39591c 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.39591e c8 iny INY +.39591f c8 iny INY +.395920 a5 3a lda $035a LDA DOS_END_PTR+2 +.395922 e5 32 sbc $0352 SBC DOS_SRC_PTR+2 +.395924 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395926 a0 12 00 ldy #$0012 LDY #FILEDESC.SIZE ; DOS_FD_PTR->SIZE++ +.395929 18 clc CLC +.39592a b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.39592c 69 01 00 adc #$0001 ADC #1 +.39592f 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395931 90 09 bcc $39593c BCC first_block +.395933 c8 iny INY +.395934 c8 iny INY +.395935 b7 20 lda [$0340],y LDA [DOS_FD_PTR],Y +.395937 69 00 00 adc #$0000 ADC #0 +.39593a 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.39593c 22 6f 58 39 jsl $39586f first_block JSL IF_NULLBUFFER ; Fill FD buffer with NULL +.395940 22 aa 58 39 jsl $3958aa JSL IF_COPY2BUFF ; Copy first (at most) 512 bytes of data to FD buffer +.395944 22 c8 54 39 jsl $3954c8 JSL IF_CREATE ; Create file. +.395948 b0 03 bcs $39594d BCS check_for_end +.39594a 82 31 00 brl $39597e BRL IF_PASSFAILURE ; If we couldn't create the file, pass the failure up +.39594d a5 30 lda $0350 check_for_end LDA DOS_SRC_PTR ; Check if we copied the last byte +.39594f c5 38 cmp $0358 CMP DOS_END_PTR +.395951 d0 06 bne $395959 BNE next_block +.395953 a5 32 lda $0352 LDA DOS_SRC_PTR+2 +.395955 c5 3a cmp $035a CMP DOS_END_PTR+2 +.395957 f0 1d beq $395976 BEQ done ; Yes: we're done +.395959 22 6f 58 39 jsl $39586f next_block JSL IF_NULLBUFFER ; Fill FD buffer with NULL +.39595d 22 aa 58 39 jsl $3958aa JSL IF_COPY2BUFF ; Copy next (at most) 512 bytes of data to FD buffer +.395961 a0 06 00 ldy #$0006 LDY #FILEDESC.CLUSTER ; Make sure the CLUSTER is 0 to force an append +.395964 a9 00 00 lda #$0000 LDA #0 +.395967 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395969 c8 iny INY +.39596a c8 iny INY +.39596b 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.39596d 22 9b 55 39 jsl $39559b JSL IF_WRITE ; Append to the file +.395971 b0 da bcs $39594d BCS check_for_end ; And try again +.395973 82 08 00 brl $39597e BRL IF_PASSFAILURE ; If we couldn't update the file, pass the failure up +.395976 5c 85 59 39 jmp $395985 done JML IF_SUCCESS +.39597a IF_FAILURE +.39597a e2 20 sep #$20 SEP #$20 ; set A short +.39597c 85 0e sta $032e STA DOS_STATUS +.39597e 28 plp IF_PASSFAILURE PLP +.39597f 18 clc CLC +.395980 ab plb PLB +.395981 2b pld PLD +.395982 7a ply PLY +.395983 fa plx PLX +.395984 6b rtl RTL +.395985 IF_SUCCESS +.395985 e2 20 sep #$20 SEP #$20 ; set A short +.395987 64 00 stz $0320 STZ BIOS_STATUS +.395989 64 0e stz $032e STZ DOS_STATUS +.39598b 28 plp PLP +.39598c 38 sec SEC +.39598d ab plb PLB +.39598e 2b pld PLD +.39598f 7a ply PLY +.395990 fa plx PLX +.395991 6b rtl RTL +.395992 IF_RUN +.395992 da phx PHX +.395993 5a phy PHY +.395994 0b phd PHD +.395995 8b phb PHB +.395996 08 php PHP +.395997 48 pha PHA ; begin setdbr macro +.395998 08 php PHP +.395999 e2 20 sep #$20 SEP #$20 ; set A short +.39599b a9 00 lda #$00 LDA #0 +.39599d 48 pha PHA +.39599e ab plb PLB +.39599f 28 plp PLP +.3959a0 68 pla PLA ; end setdbr macro +.3959a1 48 pha PHA ; begin setdp macro +.3959a2 08 php PHP +.3959a3 c2 20 rep #$20 REP #$20 ; set A long +.3959a5 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.3959a8 5b tcd TCD +.3959a9 28 plp PLP +.3959aa 68 pla PLA ; end setdp macro +.3959ab e2 20 sep #$20 SEP #$20 ; set A short +.3959ad c2 10 rep #$10 REP #$10 ; set X long +.3959af a9 00 lda #$00 LDA #0 ; Zero out the file descriptor +.3959b1 a2 00 00 ldx #$0000 LDX #0 +.3959b4 9f 00 ad 38 sta $38ad00,x clr_fd_loop STA @l DOS_SPARE_FD,X +.3959b8 e8 inx INX +.3959b9 e0 20 00 cpx #$0020 CPX #SIZE(FILEDESC) +.3959bc d0 f6 bne $3959b4 BNE clr_fd_loop +.3959be c2 20 rep #$20 REP #$20 ; set A long +.3959c0 a9 00 ab lda #$ab00 LDA #<>DOS_SPARE_SECTOR ; Set the buffer for the file descriptor +.3959c3 8f 0e ad 38 sta $38ad0e STA @l DOS_SPARE_FD+FILEDESC.BUFFER +.3959c7 a9 38 00 lda #$0038 LDA #`DOS_SPARE_SECTOR +.3959ca 8f 10 ad 38 sta $38ad10 STA @l DOS_SPARE_FD+FILEDESC.BUFFER+2 +.3959ce a5 40 lda $0360 LDA DOS_RUN_PARAM ; Set the path for the file descriptor +.3959d0 8f 02 ad 38 sta $38ad02 STA @l DOS_SPARE_FD+FILEDESC.PATH +.3959d4 a5 42 lda $0362 LDA DOS_RUN_PARAM+2 +.3959d6 8f 04 ad 38 sta $38ad04 STA @l DOS_SPARE_FD+FILEDESC.PATH+2 +.3959da a9 00 00 lda #$0000 LDA #0 ; Clear the run pointer +.3959dd 85 3c sta $035c STA DOS_RUN_PTR ; This is used to check that we loaded an executable binary +.3959df 85 3e sta $035e STA DOS_RUN_PTR+2 +.3959e1 a9 00 ad lda #$ad00 LDA #<>DOS_SPARE_FD +.3959e4 85 20 sta $0340 STA DOS_FD_PTR +.3959e6 a9 38 00 lda #$0038 LDA #`DOS_SPARE_FD +.3959e9 85 22 sta $0342 STA DOS_FD_PTR+2 +.3959eb a9 ff ff lda #$ffff LDA #$FFFF ; We want to load to the address provided by the file +.3959ee 8f 54 03 00 sta $000354 STA @l DOS_DST_PTR +.3959f2 8f 56 03 00 sta $000356 STA @l DOS_DST_PTR+2 +.3959f6 22 18 11 00 jsl $001118 JSL F_LOAD ; Try to load the file +.3959fa b0 14 bcs $395a10 BCS try_execute +.3959fc 82 7f ff brl $39597e BRL IF_PASSFAILURE ; On error: pass failure up the chain +.3959ff chk_execute +.3959ff c2 20 rep #$20 REP #$20 ; set A long +.395a01 a5 3c lda $035c LDA DOS_RUN_PTR ; Check to see if we got a startup address back +.395a03 d0 0b bne $395a10 BNE try_execute ; If so: call it +.395a05 a5 3e lda $035e LDA DOS_RUN_PTR+2 +.395a07 d0 07 bne $395a10 BNE try_execute +.395a09 e2 20 sep #$20 SEP #$20 ; set A short +.395a0b a9 11 lda #$11 LDA #DOS_ERR_NOEXEC ; If not: return an error that it's not executable +.395a0d 82 6a ff brl $39597a BRL IF_FAILURE +.395a10 try_execute +.395a10 e2 20 sep #$20 SEP #$20 ; set A short +.395a12 a9 5c lda #$5c LDA #$5C ; Write a JML opcode +.395a14 85 3b sta $035b STA DOS_RUN_PTR-1 +.395a16 22 5b 03 00 jsl $00035b JSL DOS_RUN_PTR-1 ; And call to it +.395a1a 82 68 ff brl $395985 BRL IF_SUCCESS ; Return success +.395a1d IF_ALLOCFD +.395a1d da phx PHX +.395a1e 5a phy PHY +.395a1f 0b phd PHD +.395a20 8b phb PHB +.395a21 08 php PHP +.395a22 48 pha PHA ; begin setdbr macro +.395a23 08 php PHP +.395a24 e2 20 sep #$20 SEP #$20 ; set A short +.395a26 a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.395a28 48 pha PHA +.395a29 ab plb PLB +.395a2a 28 plp PLP +.395a2b 68 pla PLA ; end setdbr macro +.395a2c 48 pha PHA ; begin setdp macro +.395a2d 08 php PHP +.395a2e c2 20 rep #$20 REP #$20 ; set A long +.395a30 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395a33 5b tcd TCD +.395a34 28 plp PLP +.395a35 68 pla PLA ; end setdp macro +.395a36 c2 10 rep #$10 REP #$10 ; set X long +.395a38 a2 00 00 ldx #$0000 LDX #0 ; Point to the first file descriptor +.395a3b chk_fd +.395a3b e2 20 sep #$20 SEP #$20 ; set A short +.395a3d bd 20 ad lda $38ad20,x LDA @w DOS_FILE_DESCS,X ; Check the file descriptor's status +.395a40 89 10 bit #$10 BIT #FD_STAT_ALLOC ; Is the file descriptor allocated? +.395a42 f0 14 beq $395a58 BEQ found ; No: flag and return the found descriptor +.395a44 next_fd +.395a44 c2 20 rep #$20 REP #$20 ; set A long +.395a46 8a txa TXA ; Yes: Move to the next file descriptor +.395a47 18 clc CLC +.395a48 69 20 00 adc #$0020 ADC #SIZE(FILEDESC) +.395a4b aa tax TAX +.395a4c e0 00 01 cpx #$0100 CPX #SIZE(FILEDESC) * DOS_FD_MAX ; Are we out of file descriptors? +.395a4f 90 ea bcc $395a3b BLT chk_fd ; No: check this new file descriptor +.395a51 e2 20 sep #$20 SEP #$20 ; set A short +.395a53 a9 16 lda #$16 LDA #DOS_ERR_NOFD ; Yes: Return failure (no file descriptors available) +.395a55 82 22 ff brl $39597a BRL IF_FAILURE +.395a58 09 10 ora #$10 found ORA #FD_STAT_ALLOC ; No: Set the ALLOC bit +.395a5a 9d 20 ad sta $38ad20,x STA @w DOS_FILE_DESCS,X ; And store it in the file descriptor's status +.395a5d c2 20 rep #$20 REP #$20 ; set A long +.395a5f 8a txa TXA +.395a60 18 clc CLC +.395a61 69 20 ad adc #$ad20 ADC #<>DOS_FILE_DESCS +.395a64 85 20 sta $0340 STA @b DOS_FD_PTR +.395a66 a9 38 00 lda #$0038 LDA #`DOS_FILE_DESCS +.395a69 69 00 00 adc #$0000 ADC #0 +.395a6c 85 22 sta $0342 STA @b DOS_FD_PTR+2 +.395a6e 82 14 ff brl $395985 BRL IF_SUCCESS ; Return this file descriptor +.395a71 IF_FREEFD +.395a71 da phx PHX +.395a72 5a phy PHY +.395a73 0b phd PHD +.395a74 8b phb PHB +.395a75 08 php PHP +.395a76 48 pha PHA ; begin setdbr macro +.395a77 08 php PHP +.395a78 e2 20 sep #$20 SEP #$20 ; set A short +.395a7a a9 38 lda #$38 LDA #`DOS_HIGH_VARIABLES +.395a7c 48 pha PHA +.395a7d ab plb PLB +.395a7e 28 plp PLP +.395a7f 68 pla PLA ; end setdbr macro +.395a80 48 pha PHA ; begin setdp macro +.395a81 08 php PHP +.395a82 c2 20 rep #$20 REP #$20 ; set A long +.395a84 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395a87 5b tcd TCD +.395a88 28 plp PLP +.395a89 68 pla PLA ; end setdp macro +.395a8a e2 20 sep #$20 SEP #$20 ; set A short +.395a8c c2 10 rep #$10 REP #$10 ; set X long +.395a8e a9 00 lda #$00 LDA #0 +.395a90 87 20 sta [$0340] STA [DOS_FD_PTR] +.395a92 82 f0 fe brl $395985 BRL IF_SUCCESS +.395a95 DOS_SRC2DST +.395a95 da phx PHX +.395a96 5a phy PHY +.395a97 0b phd PHD +.395a98 8b phb PHB +.395a99 08 php PHP +.395a9a 48 pha PHA ; begin setdp macro +.395a9b 08 php PHP +.395a9c c2 20 rep #$20 REP #$20 ; set A long +.395a9e a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395aa1 5b tcd TCD +.395aa2 28 plp PLP +.395aa3 68 pla PLA ; end setdp macro +.395aa4 c2 30 rep #$30 REP #$30 ; set A&X long +.395aa6 a0 0e 00 ldy #$000e LDY #FILEDESC.BUFFER +.395aa9 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y +.395aab aa tax TAX ; X := source buffer address +.395aac b7 34 lda [$0354],y LDA [DOS_DST_PTR],Y +.395aae a8 tay TAY ; Y := destination buffer address +.395aaf a9 00 02 lda #$0200 LDA #DOS_SECTOR_SIZE ; A := the size of the buffers +.395ab2 54 38 38 mvn $38,$38 MVN #`DOS_FILE_BUFFS,#`DOS_FILE_BUFFS ; Copy the sector data +.395ab5 28 plp PLP +.395ab6 ab plb PLB +.395ab7 2b pld PLD +.395ab8 7a ply PLY +.395ab9 fa plx PLX +.395aba 6b rtl RTL +.395abb IF_COPY +.395abb da phx PHX +.395abc 5a phy PHY +.395abd 0b phd PHD +.395abe 8b phb PHB +.395abf 08 php PHP +.395ac0 48 pha PHA ; begin setdbr macro +.395ac1 08 php PHP +.395ac2 e2 20 sep #$20 SEP #$20 ; set A short +.395ac4 a9 00 lda #$00 LDA #0 +.395ac6 48 pha PHA +.395ac7 ab plb PLB +.395ac8 28 plp PLP +.395ac9 68 pla PLA ; end setdbr macro +.395aca 48 pha PHA ; begin setdp macro +.395acb 08 php PHP +.395acc c2 20 rep #$20 REP #$20 ; set A long +.395ace a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395ad1 5b tcd TCD +.395ad2 28 plp PLP +.395ad3 68 pla PLA ; end setdp macro +.395ad4 22 1d 5a 39 jsl $395a1d JSL IF_ALLOCFD ; Allocate an FD for the source +.395ad8 b0 03 bcs $395add BCS set_src_path +.395ada 82 a1 fe brl $39597e BRL IF_PASSFAILURE ; If failed: pass the failure up the chain +.395add set_src_path +.395add c2 30 rep #$30 REP #$30 ; set A&X long +.395adf a0 02 00 ldy #$0002 LDY #FILEDESC.PATH ; Set the source path +.395ae2 a5 44 lda $0364 LDA @b DOS_STR1_PTR +.395ae4 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395ae6 c8 iny INY +.395ae7 c8 iny INY +.395ae8 a5 46 lda $0366 LDA @b DOS_STR1_PTR+2 +.395aea 97 20 sta [$0340],y STA [DOS_FD_PTR],Y +.395aec alloc_dest +.395aec c2 30 rep #$30 REP #$30 ; set A&X long +.395aee a5 20 lda $0340 LDA @b DOS_FD_PTR ; set DOS_SRC_PTR to the file descriptor pointer +.395af0 85 30 sta $0350 STA @b DOS_SRC_PTR +.395af2 a5 22 lda $0342 LDA @b DOS_FD_PTR+2 +.395af4 85 32 sta $0352 STA @b DOS_SRC_PTR+2 +.395af6 22 1d 5a 39 jsl $395a1d JSL IF_ALLOCFD ; Allocate an FD for the destination +.395afa b0 0f bcs $395b0b BCS set_paths ; If everything is ok... start setting the paths +.395afc a5 30 lda $0350 err_free_src_fd LDA @b DOS_SRC_PTR ; Get the source file descriptor pointer +.395afe 85 20 sta $0340 STA @b DOS_FD_PTR +.395b00 a5 32 lda $0352 LDA @b DOS_SRC_PTR+2 +.395b02 85 22 sta $0342 STA @b DOS_FD_PTR+2 +.395b04 22 71 5a 39 jsl $395a71 JSL IF_FREEFD ; And free it +.395b08 82 73 fe brl $39597e BRL IF_PASSFAILURE ; Pass the failure up the chain +.395b0b set_paths +.395b0b c2 30 rep #$30 REP #$30 ; set A&X long +.395b0d a5 20 lda $0340 LDA @b DOS_FD_PTR ; Set DOS_DST_PTR to the file descriptor pointer for the destination +.395b0f 85 34 sta $0354 STA @b DOS_DST_PTR +.395b11 a5 22 lda $0342 LDA @b DOS_FD_PTR+2 +.395b13 85 36 sta $0356 STA @b DOS_DST_PTR+2 +.395b15 a0 02 00 ldy #$0002 LDY #FILEDESC.PATH ; Set the destination path +.395b18 a5 48 lda $0368 LDA @b DOS_STR2_PTR +.395b1a 97 34 sta [$0354],y STA [DOS_DST_PTR],Y +.395b1c c8 iny INY +.395b1d c8 iny INY +.395b1e a5 4a lda $036a LDA @b DOS_STR2_PTR+2 +.395b20 97 34 sta [$0354],y STA [DOS_DST_PTR],Y +.395b22 a5 30 lda $0350 LDA @b DOS_SRC_PTR ; Get the source file descriptor pointer +.395b24 85 20 sta $0340 STA @b DOS_FD_PTR +.395b26 a5 32 lda $0352 LDA @b DOS_SRC_PTR+2 +.395b28 85 22 sta $0342 STA @b DOS_FD_PTR+2 +.395b2a 22 f0 10 00 jsl $0010f0 JSL F_OPEN ; Try to open the file +.395b2e b0 0f bcs $395b3f BCS src_open ; If success, work with the openned file +.395b30 a5 34 lda $0354 err_free_dst_fd LDA @b DOS_DST_PTR ; Get the destination file descriptor pointer +.395b32 85 20 sta $0340 STA @b DOS_FD_PTR +.395b34 a5 36 lda $0356 LDA @b DOS_DST_PTR+2 +.395b36 85 22 sta $0342 STA @b DOS_FD_PTR+2 +.395b38 22 71 5a 39 jsl $395a71 JSL IF_FREEFD ; And free it +.395b3c 82 bd ff brl $395afc BRL err_free_src_fd ; Free the source file descriptor +.395b3f a0 12 00 ldy #$0012 src_open LDY #FILEDESC.SIZE ; destination file size := source file size +.395b42 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y +.395b44 97 34 sta [$0354],y STA [DOS_DST_PTR],Y +.395b46 c8 iny INY +.395b47 c8 iny INY +.395b48 b7 30 lda [$0350],y LDA [DOS_SRC_PTR],Y +.395b4a 97 34 sta [$0354],y STA [DOS_DST_PTR],Y +.395b4c 22 95 5a 39 jsl $395a95 JSL DOS_SRC2DST ; Copy the first sector's worth of data +.395b50 a5 34 lda $0354 LDA @b DOS_DST_PTR ; Get the destination file descriptor pointer +.395b52 85 20 sta $0340 STA @b DOS_FD_PTR +.395b54 a5 36 lda $0356 LDA @b DOS_DST_PTR+2 +.395b56 85 22 sta $0342 STA @b DOS_FD_PTR+2 +.395b58 22 f4 10 00 jsl $0010f4 JSL F_CREATE ; Attempt to create the file +.395b5c b0 0f bcs $395b6d BCS read_next ; If sucessful, try to get the next cluster +.395b5e a5 30 lda $0350 err_src_close LDA @b DOS_SRC_PTR ; Get the source file descriptor pointer +.395b60 85 20 sta $0340 STA @b DOS_FD_PTR +.395b62 a5 32 lda $0352 LDA @b DOS_SRC_PTR+2 +.395b64 85 22 sta $0342 STA @b DOS_FD_PTR+2 +.395b66 22 f8 10 00 jsl $0010f8 JSL F_CLOSE ; Close the source file (maybe not really necessary) +.395b6a 82 c3 ff brl $395b30 BRL err_free_dst_fd ; Free the file descriptors and return an error +.395b6d read_next +.395b6d a5 30 lda $0350 LDA @b DOS_SRC_PTR ; Get the source file descriptor pointer +.395b6f 85 20 sta $0340 STA @b DOS_FD_PTR +.395b71 a5 32 lda $0352 LDA @b DOS_SRC_PTR+2 +.395b73 85 22 sta $0342 STA @b DOS_FD_PTR+2 +.395b75 22 00 11 00 jsl $001100 JSL F_READ ; Attempt to read the next sector of the source +.395b79 b0 19 bcs $395b94 BCS copy2dest ; If successful, copy the sector +.395b7b e2 20 sep #$20 SEP #$20 ; set A short +.395b7d a5 0e lda $032e LDA @b DOS_STATUS +.395b7f c9 0a cmp #$0a CMP #DOS_ERR_NOCLUSTER ; Are there no more clusters in the source file? +.395b81 f0 32 beq $395bb5 BEQ file_copied ; Yes: we're done copying +.395b83 err_dest_close +.395b83 c2 20 rep #$20 REP #$20 ; set A long +.395b85 a5 34 lda $0354 LDA @b DOS_DST_PTR ; Get the destination file descriptor pointer +.395b87 85 20 sta $0340 STA @b DOS_FD_PTR +.395b89 a5 36 lda $0356 LDA @b DOS_DST_PTR+2 +.395b8b 85 22 sta $0342 STA @b DOS_FD_PTR+2 +.395b8d 22 f8 10 00 jsl $0010f8 JSL F_CLOSE ; Attempt to close the destination +.395b91 82 ca ff brl $395b5e BRL err_src_close ; Close the source and throw an error +.395b94 copy2dest +.395b94 22 95 5a 39 jsl $395a95 JSL DOS_SRC2DST ; Copy the source sector to the destination sector +.395b98 a0 06 00 ldy #$0006 LDY #FILEDESC.CLUSTER ; destination sector cluster ID := 0 to append +.395b9b a9 00 00 lda #$0000 LDA #0 +.395b9e 97 34 sta [$0354],y STA [DOS_DST_PTR],Y +.395ba0 c8 iny INY +.395ba1 c8 iny INY +.395ba2 97 34 sta [$0354],y STA [DOS_DST_PTR],Y +.395ba4 a5 34 lda $0354 LDA @b DOS_DST_PTR ; Get the destination file descriptor pointer +.395ba6 85 20 sta $0340 STA @b DOS_FD_PTR +.395ba8 a5 36 lda $0356 LDA @b DOS_DST_PTR+2 +.395baa 85 22 sta $0342 STA @b DOS_FD_PTR+2 +.395bac 22 fc 10 00 jsl $0010fc JSL F_WRITE ; Attempt to write the destionation sector to the disk +.395bb0 90 d1 bcc $395b83 BCC err_dest_close ; If error: close all files and throw the error +.395bb2 82 b8 ff brl $395b6d BRL read_next ; Otherwise: repeat the loop +.395bb5 file_copied +.395bb5 c2 20 rep #$20 REP #$20 ; set A long +.395bb7 a5 34 lda $0354 LDA @b DOS_DST_PTR ; Get the destination file descriptor pointer +.395bb9 85 20 sta $0340 STA @b DOS_FD_PTR +.395bbb a5 36 lda $0356 LDA @b DOS_DST_PTR+2 +.395bbd 85 22 sta $0342 STA @b DOS_FD_PTR+2 +.395bbf 22 f8 10 00 jsl $0010f8 JSL F_CLOSE ; Close the destination +.395bc3 a5 30 lda $0350 LDA @b DOS_SRC_PTR ; Get the source file descriptor pointer +.395bc5 85 20 sta $0340 STA @b DOS_FD_PTR +.395bc7 a5 32 lda $0352 LDA @b DOS_SRC_PTR+2 +.395bc9 85 22 sta $0342 STA @b DOS_FD_PTR+2 +.395bcb 22 f8 10 00 jsl $0010f8 JSL F_CLOSE ; Close the source +.395bcf 82 b3 fd brl $395985 BRL IF_SUCCESS ;****** Return to file: src\kernel.asm @@ -11055,478 +11057,478 @@ =3 UART_38400 = 3 ; Code for 28400 bps =2 UART_57600 = 2 ; Code for 57600 bps =1 UART_115200 = 1 ; Code for 115200 bps -.395bcd UART_SELECT -.395bcd 08 php PHP -.395bce c2 20 rep #$20 REP #$20 ; set A long -.395bd0 c9 02 00 cmp #$0002 CMP #2 -.395bd3 f0 07 beq $395bdc BEQ is_COM2 -.395bd5 c2 20 rep #$20 REP #$20 ; set A long -.395bd7 a9 f8 13 lda #$13f8 LDA #<>UART1_BASE -.395bda 80 05 bra $395be1 BRA setaddr -.395bdc is_COM2 -.395bdc c2 20 rep #$20 REP #$20 ; set A long -.395bde a9 f8 12 lda #$12f8 LDA #<>UART2_BASE -.395be1 8f 00 07 00 sta $000700 setaddr STA @lCURRUART -.395be5 e2 20 sep #$20 SEP #$20 ; set A short -.395be7 a9 af lda #$af LDA #`UART1_BASE -.395be9 8f 02 07 00 sta $000702 STA @lCURRUART+2 -.395bed 28 plp PLP -.395bee 6b rtl RTL -.395bef UART_SETBPS -.395bef 08 php PHP -.395bf0 0b phd PHD -.395bf1 48 pha PHA ; begin setdp macro -.395bf2 08 php PHP -.395bf3 c2 20 rep #$20 REP #$20 ; set A long -.395bf5 a9 00 07 lda #$0700 LDA #CURRUART ; set DP to page 0 -.395bf8 5b tcd TCD -.395bf9 28 plp PLP -.395bfa 68 pla PLA ; end setdp macro -.395bfb c2 30 rep #$30 REP #$30 ; set A&X long -.395bfd 48 pha PHA -.395bfe e2 20 sep #$20 SEP #$20 ; set A short -.395c00 a0 03 00 ldy #$0003 LDY #UART_LCR ; Enable divisor latch -.395c03 b7 00 lda [$0700],y LDA [CURRUART],Y -.395c05 09 80 ora #$80 ORA #LCR_DLB -.395c07 97 00 sta [$0700],y STA [CURRUART],Y -.395c09 c2 20 rep #$20 REP #$20 ; set A long -.395c0b 68 pla PLA -.395c0c a0 00 00 ldy #$0000 LDY #UART_DLL -.395c0f 97 00 sta [$0700],y STA [CURRUART],Y ; Save the divisor to the UART -.395c11 e2 20 sep #$20 SEP #$20 ; set A short -.395c13 a0 03 00 ldy #$0003 LDY #UART_LCR ; Disable divisor latch -.395c16 b7 00 lda [$0700],y LDA [CURRUART],Y -.395c18 49 80 eor #$80 EOR #LCR_DLB -.395c1a 97 00 sta [$0700],y STA [CURRUART],Y -.395c1c 2b pld PLD -.395c1d 28 plp PLP -.395c1e 6b rtl RTL -.395c1f UART_SETLCR -.395c1f 08 php PHP -.395c20 0b phd PHD -.395c21 48 pha PHA ; begin setdp macro -.395c22 08 php PHP -.395c23 c2 20 rep #$20 REP #$20 ; set A long -.395c25 a9 00 07 lda #$0700 LDA #CURRUART ; set DP to page 0 -.395c28 5b tcd TCD -.395c29 28 plp PLP -.395c2a 68 pla PLA ; end setdp macro -.395c2b e2 20 sep #$20 SEP #$20 ; set A short -.395c2d c2 10 rep #$10 REP #$10 ; set X long -.395c2f 29 7f and #$7f AND #$7F ; We don't want to alter divisor latch -.395c31 a0 03 00 ldy #$0003 LDY #UART_LCR -.395c34 97 00 sta [$0700],y STA [CURRUART],Y -.395c36 2b pld PLD -.395c37 28 plp PLP -.395c38 6b rtl RTL -.395c39 UART_INIT -.395c39 08 php PHP -.395c3a 0b phd PHD -.395c3b c2 30 rep #$30 REP #$30 ; set A&X long -.395c3d 48 pha PHA ; begin setdp macro -.395c3e 08 php PHP -.395c3f c2 20 rep #$20 REP #$20 ; set A long -.395c41 a9 00 07 lda #$0700 LDA #CURRUART ; set DP to page 0 -.395c44 5b tcd TCD -.395c45 28 plp PLP -.395c46 68 pla PLA ; end setdp macro -.395c47 a9 01 00 lda #$0001 LDA #UART_115200 -.395c4a 22 ef 5b 39 jsl $395bef JSL UART_SETBPS -.395c4e e2 20 sep #$20 SEP #$20 ; set A short -.395c50 a9 03 lda #$03 LDA #LCR_PARITY_NONE | LCR_STOPBIT_1 | LCR_DATABITS_8 -.395c52 22 1f 5c 39 jsl $395c1f JSL UART_SETLCR -.395c56 a9 e1 lda #$e1 LDA #%11100001 -.395c58 a0 02 00 ldy #$0002 LDY #UART_FCR -.395c5b 97 00 sta [$0700],y STA [CURRUART],Y -.395c5d 2b pld PLD -.395c5e 28 plp PLP -.395c5f 6b rtl RTL -.395c60 UART_HASBYT -.395c60 08 php PHP -.395c61 0b phd PHD -.395c62 c2 30 rep #$30 REP #$30 ; set A&X long -.395c64 48 pha PHA ; begin setdp macro -.395c65 08 php PHP -.395c66 c2 20 rep #$20 REP #$20 ; set A long -.395c68 a9 00 07 lda #$0700 LDA #CURRUART ; set DP to page 0 -.395c6b 5b tcd TCD -.395c6c 28 plp PLP -.395c6d 68 pla PLA ; end setdp macro -.395c6e e2 20 sep #$20 SEP #$20 ; set A short -.395c70 a0 05 00 ldy #$0005 LDY #UART_LSR ; Check the receive FIFO -.395c73 b7 00 lda [$0700],y wait_putc LDA [CURRUART],Y -.395c75 29 01 and #$01 AND #LSR_DATA_AVAIL -.395c77 d0 04 bne $395c7d BNE ret_true ; If flag is set, return true -.395c79 2b pld ret_false PLD ; Return false -.395c7a 28 plp PLP -.395c7b 18 clc CLC -.395c7c 6b rtl RTL -.395c7d 2b pld ret_true PLD ; Return true -.395c7e 28 plp PLP -.395c7f 38 sec SEC -.395c80 6b rtl RTL -.395c81 UART_GETC -.395c81 08 php PHP -.395c82 0b phd PHD -.395c83 c2 30 rep #$30 REP #$30 ; set A&X long -.395c85 48 pha PHA ; begin setdp macro -.395c86 08 php PHP -.395c87 c2 20 rep #$20 REP #$20 ; set A long -.395c89 a9 00 07 lda #$0700 LDA #CURRUART ; set DP to page 0 -.395c8c 5b tcd TCD -.395c8d 28 plp PLP -.395c8e 68 pla PLA ; end setdp macro -.395c8f e2 20 sep #$20 SEP #$20 ; set A short -.395c91 a0 05 00 ldy #$0005 LDY #UART_LSR ; Check the receive FIFO -.395c94 b7 00 lda [$0700],y wait_getc LDA [CURRUART],Y -.395c96 29 01 and #$01 AND #LSR_DATA_AVAIL -.395c98 f0 fa beq $395c94 BEQ wait_getc ; If the flag is clear, wait -.395c9a a0 00 00 ldy #$0000 LDY #UART_TRHB ; Get the byte from the receive FIFO -.395c9d b7 00 lda [$0700],y LDA [CURRUART],Y -.395c9f 2b pld PLD -.395ca0 28 plp PLP -.395ca1 6b rtl RTL -.395ca2 UART_PUTC -.395ca2 08 php PHP -.395ca3 0b phd PHD -.395ca4 c2 30 rep #$30 REP #$30 ; set A&X long -.395ca6 48 pha PHA ; begin setdp macro -.395ca7 08 php PHP -.395ca8 c2 20 rep #$20 REP #$20 ; set A long -.395caa a9 00 07 lda #$0700 LDA #CURRUART ; set DP to page 0 -.395cad 5b tcd TCD -.395cae 28 plp PLP -.395caf 68 pla PLA ; end setdp macro -.395cb0 e2 20 sep #$20 SEP #$20 ; set A short -.395cb2 48 pha PHA ; Wait for the transmit FIFO to free up -.395cb3 a0 05 00 ldy #$0005 LDY #UART_LSR -.395cb6 b7 00 lda [$0700],y wait_putc LDA [CURRUART],Y -.395cb8 29 20 and #$20 AND #LSR_XMIT_EMPTY -.395cba f0 fa beq $395cb6 BEQ wait_putc -.395cbc 68 pla PLA -.395cbd a0 00 00 ldy #$0000 LDY #UART_TRHB -.395cc0 97 00 sta [$0700],y STA [CURRUART],Y -.395cc2 2b pld PLD -.395cc3 28 plp PLP -.395cc4 6b rtl RTL -.395cc5 UART_PUTS -.395cc5 08 php PHP -.395cc6 e2 20 sep #$20 SEP #$20 ; set A short -.395cc8 bd 00 00 lda $0000,x put_loop LDA #0,B,X -.395ccb f0 07 beq $395cd4 BEQ done -.395ccd 22 a2 5c 39 jsl $395ca2 JSL UART_PUTC -.395cd1 e8 inx INX -.395cd2 80 f4 bra $395cc8 BRA put_loop -.395cd4 28 plp done PLP -.395cd5 6b rtl RTL +.395bd2 UART_SELECT +.395bd2 08 php PHP +.395bd3 c2 20 rep #$20 REP #$20 ; set A long +.395bd5 c9 02 00 cmp #$0002 CMP #2 +.395bd8 f0 07 beq $395be1 BEQ is_COM2 +.395bda c2 20 rep #$20 REP #$20 ; set A long +.395bdc a9 f8 13 lda #$13f8 LDA #<>UART1_BASE +.395bdf 80 05 bra $395be6 BRA setaddr +.395be1 is_COM2 +.395be1 c2 20 rep #$20 REP #$20 ; set A long +.395be3 a9 f8 12 lda #$12f8 LDA #<>UART2_BASE +.395be6 8f 00 07 00 sta $000700 setaddr STA @lCURRUART +.395bea e2 20 sep #$20 SEP #$20 ; set A short +.395bec a9 af lda #$af LDA #`UART1_BASE +.395bee 8f 02 07 00 sta $000702 STA @lCURRUART+2 +.395bf2 28 plp PLP +.395bf3 6b rtl RTL +.395bf4 UART_SETBPS +.395bf4 08 php PHP +.395bf5 0b phd PHD +.395bf6 48 pha PHA ; begin setdp macro +.395bf7 08 php PHP +.395bf8 c2 20 rep #$20 REP #$20 ; set A long +.395bfa a9 00 07 lda #$0700 LDA #CURRUART ; set DP to page 0 +.395bfd 5b tcd TCD +.395bfe 28 plp PLP +.395bff 68 pla PLA ; end setdp macro +.395c00 c2 30 rep #$30 REP #$30 ; set A&X long +.395c02 48 pha PHA +.395c03 e2 20 sep #$20 SEP #$20 ; set A short +.395c05 a0 03 00 ldy #$0003 LDY #UART_LCR ; Enable divisor latch +.395c08 b7 00 lda [$0700],y LDA [CURRUART],Y +.395c0a 09 80 ora #$80 ORA #LCR_DLB +.395c0c 97 00 sta [$0700],y STA [CURRUART],Y +.395c0e c2 20 rep #$20 REP #$20 ; set A long +.395c10 68 pla PLA +.395c11 a0 00 00 ldy #$0000 LDY #UART_DLL +.395c14 97 00 sta [$0700],y STA [CURRUART],Y ; Save the divisor to the UART +.395c16 e2 20 sep #$20 SEP #$20 ; set A short +.395c18 a0 03 00 ldy #$0003 LDY #UART_LCR ; Disable divisor latch +.395c1b b7 00 lda [$0700],y LDA [CURRUART],Y +.395c1d 49 80 eor #$80 EOR #LCR_DLB +.395c1f 97 00 sta [$0700],y STA [CURRUART],Y +.395c21 2b pld PLD +.395c22 28 plp PLP +.395c23 6b rtl RTL +.395c24 UART_SETLCR +.395c24 08 php PHP +.395c25 0b phd PHD +.395c26 48 pha PHA ; begin setdp macro +.395c27 08 php PHP +.395c28 c2 20 rep #$20 REP #$20 ; set A long +.395c2a a9 00 07 lda #$0700 LDA #CURRUART ; set DP to page 0 +.395c2d 5b tcd TCD +.395c2e 28 plp PLP +.395c2f 68 pla PLA ; end setdp macro +.395c30 e2 20 sep #$20 SEP #$20 ; set A short +.395c32 c2 10 rep #$10 REP #$10 ; set X long +.395c34 29 7f and #$7f AND #$7F ; We don't want to alter divisor latch +.395c36 a0 03 00 ldy #$0003 LDY #UART_LCR +.395c39 97 00 sta [$0700],y STA [CURRUART],Y +.395c3b 2b pld PLD +.395c3c 28 plp PLP +.395c3d 6b rtl RTL +.395c3e UART_INIT +.395c3e 08 php PHP +.395c3f 0b phd PHD +.395c40 c2 30 rep #$30 REP #$30 ; set A&X long +.395c42 48 pha PHA ; begin setdp macro +.395c43 08 php PHP +.395c44 c2 20 rep #$20 REP #$20 ; set A long +.395c46 a9 00 07 lda #$0700 LDA #CURRUART ; set DP to page 0 +.395c49 5b tcd TCD +.395c4a 28 plp PLP +.395c4b 68 pla PLA ; end setdp macro +.395c4c a9 01 00 lda #$0001 LDA #UART_115200 +.395c4f 22 f4 5b 39 jsl $395bf4 JSL UART_SETBPS +.395c53 e2 20 sep #$20 SEP #$20 ; set A short +.395c55 a9 03 lda #$03 LDA #LCR_PARITY_NONE | LCR_STOPBIT_1 | LCR_DATABITS_8 +.395c57 22 24 5c 39 jsl $395c24 JSL UART_SETLCR +.395c5b a9 e1 lda #$e1 LDA #%11100001 +.395c5d a0 02 00 ldy #$0002 LDY #UART_FCR +.395c60 97 00 sta [$0700],y STA [CURRUART],Y +.395c62 2b pld PLD +.395c63 28 plp PLP +.395c64 6b rtl RTL +.395c65 UART_HASBYT +.395c65 08 php PHP +.395c66 0b phd PHD +.395c67 c2 30 rep #$30 REP #$30 ; set A&X long +.395c69 48 pha PHA ; begin setdp macro +.395c6a 08 php PHP +.395c6b c2 20 rep #$20 REP #$20 ; set A long +.395c6d a9 00 07 lda #$0700 LDA #CURRUART ; set DP to page 0 +.395c70 5b tcd TCD +.395c71 28 plp PLP +.395c72 68 pla PLA ; end setdp macro +.395c73 e2 20 sep #$20 SEP #$20 ; set A short +.395c75 a0 05 00 ldy #$0005 LDY #UART_LSR ; Check the receive FIFO +.395c78 b7 00 lda [$0700],y wait_putc LDA [CURRUART],Y +.395c7a 29 01 and #$01 AND #LSR_DATA_AVAIL +.395c7c d0 04 bne $395c82 BNE ret_true ; If flag is set, return true +.395c7e 2b pld ret_false PLD ; Return false +.395c7f 28 plp PLP +.395c80 18 clc CLC +.395c81 6b rtl RTL +.395c82 2b pld ret_true PLD ; Return true +.395c83 28 plp PLP +.395c84 38 sec SEC +.395c85 6b rtl RTL +.395c86 UART_GETC +.395c86 08 php PHP +.395c87 0b phd PHD +.395c88 c2 30 rep #$30 REP #$30 ; set A&X long +.395c8a 48 pha PHA ; begin setdp macro +.395c8b 08 php PHP +.395c8c c2 20 rep #$20 REP #$20 ; set A long +.395c8e a9 00 07 lda #$0700 LDA #CURRUART ; set DP to page 0 +.395c91 5b tcd TCD +.395c92 28 plp PLP +.395c93 68 pla PLA ; end setdp macro +.395c94 e2 20 sep #$20 SEP #$20 ; set A short +.395c96 a0 05 00 ldy #$0005 LDY #UART_LSR ; Check the receive FIFO +.395c99 b7 00 lda [$0700],y wait_getc LDA [CURRUART],Y +.395c9b 29 01 and #$01 AND #LSR_DATA_AVAIL +.395c9d f0 fa beq $395c99 BEQ wait_getc ; If the flag is clear, wait +.395c9f a0 00 00 ldy #$0000 LDY #UART_TRHB ; Get the byte from the receive FIFO +.395ca2 b7 00 lda [$0700],y LDA [CURRUART],Y +.395ca4 2b pld PLD +.395ca5 28 plp PLP +.395ca6 6b rtl RTL +.395ca7 UART_PUTC +.395ca7 08 php PHP +.395ca8 0b phd PHD +.395ca9 c2 30 rep #$30 REP #$30 ; set A&X long +.395cab 48 pha PHA ; begin setdp macro +.395cac 08 php PHP +.395cad c2 20 rep #$20 REP #$20 ; set A long +.395caf a9 00 07 lda #$0700 LDA #CURRUART ; set DP to page 0 +.395cb2 5b tcd TCD +.395cb3 28 plp PLP +.395cb4 68 pla PLA ; end setdp macro +.395cb5 e2 20 sep #$20 SEP #$20 ; set A short +.395cb7 48 pha PHA ; Wait for the transmit FIFO to free up +.395cb8 a0 05 00 ldy #$0005 LDY #UART_LSR +.395cbb b7 00 lda [$0700],y wait_putc LDA [CURRUART],Y +.395cbd 29 20 and #$20 AND #LSR_XMIT_EMPTY +.395cbf f0 fa beq $395cbb BEQ wait_putc +.395cc1 68 pla PLA +.395cc2 a0 00 00 ldy #$0000 LDY #UART_TRHB +.395cc5 97 00 sta [$0700],y STA [CURRUART],Y +.395cc7 2b pld PLD +.395cc8 28 plp PLP +.395cc9 6b rtl RTL +.395cca UART_PUTS +.395cca 08 php PHP +.395ccb e2 20 sep #$20 SEP #$20 ; set A short +.395ccd bd 00 00 lda $0000,x put_loop LDA #0,B,X +.395cd0 f0 07 beq $395cd9 BEQ done +.395cd2 22 a7 5c 39 jsl $395ca7 JSL UART_PUTC +.395cd6 e8 inx INX +.395cd7 80 f4 bra $395ccd BRA put_loop +.395cd9 28 plp done PLP +.395cda 6b rtl RTL ;****** Return to file: src\kernel.asm ;****** Processing file: src\joystick.asm -.395cd6 JOYSTICK_SET_NES_MODE -.395cd6 e2 20 sep #$20 SEP #$20 ; set A short -.395cd8 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE -.395cdc 29 fb and #$fb AND #~NES_SNES_JOY ; 0 = NES (8 bit shift) -.395cde 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE -.395ce2 6b rtl RTL -.395ce3 JOYSTICK_SET_SNES_MODE -.395ce3 e2 20 sep #$20 SEP #$20 ; set A short -.395ce5 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE -.395ce9 29 fb and #$fb AND #~NES_SNES_JOY -.395ceb 09 04 ora #$04 ORA #NES_SNES_JOY ; 1 = SNES (12 Bit Shift) -.395ced 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE -.395cf1 6b rtl RTL -.395cf2 JOYSTICK_ENABLE_NES_SNES_PORT0 -.395cf2 e2 20 sep #$20 SEP #$20 ; set A short -.395cf4 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE -.395cf8 29 fe and #$fe AND #~NES_SNES_EN0 -.395cfa 09 01 ora #$01 ORA #NES_SNES_EN0 -.395cfc 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE -.395d00 6b rtl RTL -.395d01 JOYSTICK_ENABLE_NES_SNES_PORT1 -.395d01 e2 20 sep #$20 SEP #$20 ; set A short -.395d03 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE -.395d07 29 fd and #$fd AND #~NES_SNES_EN1 -.395d09 09 02 ora #$02 ORA #NES_SNES_EN1 -.395d0b 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE -.395d0f 6b rtl RTL -.395d10 JOYSTICK_DISABLE_NES_SNES_PORT0 -.395d10 e2 20 sep #$20 SEP #$20 ; set A short -.395d12 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE -.395d16 29 fe and #$fe AND #~NES_SNES_EN0 -.395d18 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE -.395d1c 6b rtl RTL -.395d1d JOYSTICK_DISABLE_NES_SNES_PORT1 -.395d1d e2 20 sep #$20 SEP #$20 ; set A short -.395d1f af 04 e8 af lda $afe804 LDA JOYSTICK_MODE -.395d23 29 fd and #$fd AND #~NES_SNES_EN1 -.395d25 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE -.395d29 6b rtl RTL -.395d2a JOYSTICK_NES_SNES_TRIG_WITH_POLL -.395d2a e2 20 sep #$20 SEP #$20 ; set A short -.395d2c af 04 e8 af lda $afe804 LDA JOYSTICK_MODE -.395d30 29 03 and #$03 AND #(NES_SNES_EN0 | NES_SNES_EN1) -.395d32 c9 00 cmp #$00 CMP #$00 -.395d34 f0 14 beq $395d4a BEQ END_OF_JOYSTICK_POLL -.395d36 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE -.395d3a 09 80 ora #$80 ORA #NES_SNES_TRIG ; Set to 1 (Will auto Clear) -.395d3c 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE -.395d40 JOYSTICK_POLLING_ISNOTOVER -.395d40 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE ; -.395d44 29 40 and #$40 AND #NES_SNES_DONE -.395d46 c9 40 cmp #$40 CMP #NES_SNES_DONE -.395d48 d0 f6 bne $395d40 BNE JOYSTICK_POLLING_ISNOTOVER -.395d4a END_OF_JOYSTICK_POLL -.395d4a 6b rtl RTL +.395cdb JOYSTICK_SET_NES_MODE +.395cdb e2 20 sep #$20 SEP #$20 ; set A short +.395cdd af 04 e8 af lda $afe804 LDA JOYSTICK_MODE +.395ce1 29 fb and #$fb AND #~NES_SNES_JOY ; 0 = NES (8 bit shift) +.395ce3 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE +.395ce7 6b rtl RTL +.395ce8 JOYSTICK_SET_SNES_MODE +.395ce8 e2 20 sep #$20 SEP #$20 ; set A short +.395cea af 04 e8 af lda $afe804 LDA JOYSTICK_MODE +.395cee 29 fb and #$fb AND #~NES_SNES_JOY +.395cf0 09 04 ora #$04 ORA #NES_SNES_JOY ; 1 = SNES (12 Bit Shift) +.395cf2 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE +.395cf6 6b rtl RTL +.395cf7 JOYSTICK_ENABLE_NES_SNES_PORT0 +.395cf7 e2 20 sep #$20 SEP #$20 ; set A short +.395cf9 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE +.395cfd 29 fe and #$fe AND #~NES_SNES_EN0 +.395cff 09 01 ora #$01 ORA #NES_SNES_EN0 +.395d01 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE +.395d05 6b rtl RTL +.395d06 JOYSTICK_ENABLE_NES_SNES_PORT1 +.395d06 e2 20 sep #$20 SEP #$20 ; set A short +.395d08 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE +.395d0c 29 fd and #$fd AND #~NES_SNES_EN1 +.395d0e 09 02 ora #$02 ORA #NES_SNES_EN1 +.395d10 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE +.395d14 6b rtl RTL +.395d15 JOYSTICK_DISABLE_NES_SNES_PORT0 +.395d15 e2 20 sep #$20 SEP #$20 ; set A short +.395d17 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE +.395d1b 29 fe and #$fe AND #~NES_SNES_EN0 +.395d1d 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE +.395d21 6b rtl RTL +.395d22 JOYSTICK_DISABLE_NES_SNES_PORT1 +.395d22 e2 20 sep #$20 SEP #$20 ; set A short +.395d24 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE +.395d28 29 fd and #$fd AND #~NES_SNES_EN1 +.395d2a 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE +.395d2e 6b rtl RTL +.395d2f JOYSTICK_NES_SNES_TRIG_WITH_POLL +.395d2f e2 20 sep #$20 SEP #$20 ; set A short +.395d31 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE +.395d35 29 03 and #$03 AND #(NES_SNES_EN0 | NES_SNES_EN1) +.395d37 c9 00 cmp #$00 CMP #$00 +.395d39 f0 14 beq $395d4f BEQ END_OF_JOYSTICK_POLL +.395d3b af 04 e8 af lda $afe804 LDA JOYSTICK_MODE +.395d3f 09 80 ora #$80 ORA #NES_SNES_TRIG ; Set to 1 (Will auto Clear) +.395d41 8f 04 e8 af sta $afe804 STA JOYSTICK_MODE +.395d45 JOYSTICK_POLLING_ISNOTOVER +.395d45 af 04 e8 af lda $afe804 LDA JOYSTICK_MODE ; +.395d49 29 40 and #$40 AND #NES_SNES_DONE +.395d4b c9 40 cmp #$40 CMP #NES_SNES_DONE +.395d4d d0 f6 bne $395d45 BNE JOYSTICK_POLLING_ISNOTOVER +.395d4f END_OF_JOYSTICK_POLL +.395d4f 6b rtl RTL ;****** Return to file: src\kernel.asm ;****** Processing file: src\sdc_library.asm -.395d4b SDC_TEST -.395d4b 8b phb PHB -.395d4c 0b phd PHD -.395d4d 08 php PHP -.395d4e 48 pha PHA ; begin setdbr macro -.395d4f 08 php PHP -.395d50 e2 20 sep #$20 SEP #$20 ; set A short -.395d52 a9 00 lda #$00 LDA #0 -.395d54 48 pha PHA -.395d55 ab plb PLB -.395d56 28 plp PLP -.395d57 68 pla PLA ; end setdbr macro -.395d58 48 pha PHA ; begin setdp macro -.395d59 08 php PHP -.395d5a c2 20 rep #$20 REP #$20 ; set A long -.395d5c a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395d5f 5b tcd TCD -.395d60 28 plp PLP -.395d61 68 pla PLA ; end setdp macro -.395d62 e2 20 sep #$20 SEP #$20 ; set A short -.395d64 a9 f0 lda #$f0 LDA #$F0 ; Set white on black background -.395d66 8d 1e 00 sta $001e STA @w CURCOLOR -.395d69 22 a8 10 00 jsl $0010a8 JSL CLRSCREEN -.395d6d 22 a0 10 00 jsl $0010a0 JSL CSRHOME -.395d71 22 b1 5d 39 jsl $395db1 JSL SDC_INIT ; Attempt to initilize the SDC interface -.395d75 b0 03 bcs $395d7a BCS init_ok -.395d77 82 15 00 brl $395d8f BRL done -.395d7a a9 02 lda #$02 init_ok LDA #BIOS_DEV_SD -.395d7c 85 01 sta $0321 STA BIOS_DEV -.395d7e 22 54 45 39 jsl $394554 JSL DOS_MOUNT ; Attempt to mount the SDC -.395d82 b0 03 bcs $395d87 BCS mount_ok -.395d84 82 08 00 brl $395d8f BRL done -.395d87 22 02 56 39 jsl $395602 mount_ok JSL IF_DIROPEN -.395d8b b0 02 bcs $395d8f BCS all_ok -.395d8d 80 00 bra $395d8f BRA done -.395d8f all_ok -.395d8f 22 6c 10 00 jsl $00106c done JSL PRINTCR -.395d93 28 plp PLP -.395d94 2b pld PLD -.395d95 ab plb PLB -.395d96 6b rtl RTL -.395d97 SDC_WAITBUSY -.395d97 08 php PHP -.395d98 e2 20 sep #$20 SEP #$20 ; set A short -.395d9a af 04 ea af lda $afea04 wait_xact LDA @l SDC_TRANS_STATUS_REG ; Wait for the transaction to complete -.395d9e 29 01 and #$01 AND #SDC_TRANS_BUSY -.395da0 c9 01 cmp #$01 CMP #SDC_TRANS_BUSY -.395da2 f0 f6 beq $395d9a BEQ wait_xact -.395da4 28 plp PLP -.395da5 6b rtl RTL -.395da6 SDC_RESET -.395da6 08 php PHP -.395da7 e2 20 sep #$20 SEP #$20 ; set A short -.395da9 a9 01 lda #$01 LDA #1 -.395dab 8f 01 ea af sta $afea01 STA @l SDC_CONTROL_REG -.395daf 28 plp PLP -.395db0 6b rtl RTL -.395db1 SDC_INIT -.395db1 0b phd PHD -.395db2 8b phb PHB -.395db3 08 php PHP -.395db4 48 pha PHA ; begin setdbr macro -.395db5 08 php PHP -.395db6 e2 20 sep #$20 SEP #$20 ; set A short -.395db8 a9 00 lda #$00 LDA #0 -.395dba 48 pha PHA -.395dbb ab plb PLB -.395dbc 28 plp PLP -.395dbd 68 pla PLA ; end setdbr macro -.395dbe 48 pha PHA ; begin setdp macro -.395dbf 08 php PHP -.395dc0 c2 20 rep #$20 REP #$20 ; set A long -.395dc2 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395dc5 5b tcd TCD -.395dc6 28 plp PLP -.395dc7 68 pla PLA ; end setdp macro -.395dc8 e2 20 sep #$20 SEP #$20 ; set A short -.395dca a9 01 lda #$01 start_trans LDA #SDC_TRANS_INIT_SD -.395dcc 8f 02 ea af sta $afea02 STA @l SDC_TRANS_TYPE_REG ; Set Init SD -.395dd0 a9 01 lda #$01 LDA #SDC_TRANS_START ; Set the transaction to start -.395dd2 8f 03 ea af sta $afea03 STA @l SDC_TRANS_CONTROL_REG -.395dd6 22 97 5d 39 jsl $395d97 JSL SDC_WAITBUSY ; Wait for initialization to complete -.395dda af 05 ea af lda $afea05 LDA @l SDC_TRANS_ERROR_REG ; Check for errors -.395dde d0 07 bne $395de7 BNE ret_error ; Is there one? Process the error -.395de0 64 00 stz $0320 ret_success STZ BIOS_STATUS -.395de2 28 plp PLP -.395de3 ab plb PLB -.395de4 2b pld PLD -.395de5 38 sec SEC -.395de6 6b rtl RTL -.395de7 8d 06 03 sta $0306 ret_error STA @w FDC_ST0 -.395dea a9 8b lda #$8b LDA #BIOS_ERR_NOTINIT -.395dec 85 00 sta $0320 set_error STA BIOS_STATUS -.395dee 28 plp PLP -.395def ab plb PLB -.395df0 2b pld PLD -.395df1 18 clc CLC -.395df2 6b rtl RTL -.395df3 SDC_GETBLOCK -.395df3 0b phd PHD -.395df4 8b phb PHB -.395df5 08 php PHP -.395df6 48 pha PHA ; begin setdbr macro -.395df7 08 php PHP -.395df8 e2 20 sep #$20 SEP #$20 ; set A short -.395dfa a9 00 lda #$00 LDA #0 -.395dfc 48 pha PHA -.395dfd ab plb PLB -.395dfe 28 plp PLP -.395dff 68 pla PLA ; end setdbr macro -.395e00 48 pha PHA ; begin setdp macro -.395e01 08 php PHP -.395e02 c2 20 rep #$20 REP #$20 ; set A long -.395e04 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395e07 5b tcd TCD -.395e08 28 plp PLP -.395e09 68 pla PLA ; end setdp macro -.395e0a e2 20 sep #$20 SEP #$20 ; set A short -.395e0c af 80 e8 af lda $afe880 LDA @l GABE_MSTR_CTRL ; Turn on the SDC activity light -.395e10 09 02 ora #$02 ORA #GABE_CTRL_SDC_LED -.395e12 8f 80 e8 af sta $afe880 STA @l GABE_MSTR_CTRL -.395e16 a9 00 lda #$00 LDA #0 -.395e18 8f 07 ea af sta $afea07 STA @l SDC_SD_ADDR_7_0_REG -.395e1c a5 02 lda $0322 LDA BIOS_LBA ; Set the LBA to read -.395e1e 0a asl a ASL A -.395e1f 8f 08 ea af sta $afea08 STA @l SDC_SD_ADDR_15_8_REG -.395e23 a5 03 lda $0323 LDA BIOS_LBA+1 -.395e25 2a rol a ROL A -.395e26 8f 09 ea af sta $afea09 STA @l SDC_SD_ADDR_23_16_REG -.395e2a a5 04 lda $0324 LDA BIOS_LBA+2 -.395e2c 2a rol a ROL A -.395e2d 8f 0a ea af sta $afea0a STA @l SDC_SD_ADDR_31_24_REG -.395e31 a9 02 lda #$02 LDA #SDC_TRANS_READ_BLK ; Set the transaction to READ -.395e33 8f 02 ea af sta $afea02 STA @l SDC_TRANS_TYPE_REG -.395e37 a9 01 lda #$01 LDA #SDC_TRANS_START ; Set the transaction to start -.395e39 8f 03 ea af sta $afea03 STA @l SDC_TRANS_CONTROL_REG -.395e3d 22 97 5d 39 jsl $395d97 JSL SDC_WAITBUSY ; Wait for transaction to complete -.395e41 af 05 ea af lda $afea05 LDA @l SDC_TRANS_ERROR_REG ; Check for errors -.395e45 d0 36 bne $395e7d BNE ret_error ; Is there one? Process the error -.395e47 e2 20 sep #$20 SEP #$20 ; set A short -.395e49 af 13 ea af lda $afea13 LDA @l SDC_RX_FIFO_DATA_CNT_LO ; Record the number of bytes read -.395e4d 85 0a sta $032a STA BIOS_FIFO_COUNT -.395e4f af 12 ea af lda $afea12 LDA @l SDC_RX_FIFO_DATA_CNT_HI -.395e53 85 0b sta $032b STA BIOS_FIFO_COUNT+1 -.395e55 c2 10 rep #$10 REP #$10 ; set X long -.395e57 a0 00 00 ldy #$0000 LDY #0 -.395e5a af 10 ea af lda $afea10 loop_rd LDA @l SDC_RX_FIFO_DATA_REG ; Get the byte... -.395e5e 97 06 sta [$0326],y STA [BIOS_BUFF_PTR],Y ; Save it to the buffer -.395e60 c8 iny INY ; Advance to the next byte -.395e61 c0 00 02 cpy #$0200 CPY #512 ; Have we read all the bytes? -.395e64 d0 f4 bne $395e5a BNE loop_rd ; No: keep reading -.395e66 af 05 ea af lda $afea05 LDA @l SDC_TRANS_ERROR_REG ; Check for errors -.395e6a d0 11 bne $395e7d BNE ret_error ; Is there one? Process the error -.395e6c 64 00 stz $0320 ret_success STZ BIOS_STATUS ; Return success -.395e6e af 80 e8 af lda $afe880 LDA @l GABE_MSTR_CTRL ; Turn off the SDC activity light -.395e72 29 fd and #$fd AND #~GABE_CTRL_SDC_LED -.395e74 8f 80 e8 af sta $afe880 STA @l GABE_MSTR_CTRL -.395e78 28 plp PLP -.395e79 ab plb PLB -.395e7a 2b pld PLD -.395e7b 38 sec SEC -.395e7c 6b rtl RTL -.395e7d 8d 06 03 sta $0306 ret_error STA @w FDC_ST0 -.395e80 a9 82 lda #$82 LDA #BIOS_ERR_READ -.395e82 85 00 sta $0320 STA BIOS_STATUS -.395e84 af 80 e8 af lda $afe880 LDA @l GABE_MSTR_CTRL ; Turn off the SDC activity light -.395e88 29 fd and #$fd AND #~GABE_CTRL_SDC_LED -.395e8a 8f 80 e8 af sta $afe880 STA @l GABE_MSTR_CTRL -.395e8e 28 plp PLP -.395e8f ab plb PLB -.395e90 2b pld PLD -.395e91 18 clc CLC -.395e92 6b rtl RTL -.395e93 SDC_PUTBLOCK -.395e93 0b phd PHD -.395e94 8b phb PHB -.395e95 08 php PHP -.395e96 48 pha PHA ; begin setdbr macro -.395e97 08 php PHP -.395e98 e2 20 sep #$20 SEP #$20 ; set A short -.395e9a a9 00 lda #$00 LDA #0 -.395e9c 48 pha PHA -.395e9d ab plb PLB -.395e9e 28 plp PLP -.395e9f 68 pla PLA ; end setdbr macro -.395ea0 48 pha PHA ; begin setdp macro -.395ea1 08 php PHP -.395ea2 c2 20 rep #$20 REP #$20 ; set A long -.395ea4 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.395ea7 5b tcd TCD -.395ea8 28 plp PLP -.395ea9 68 pla PLA ; end setdp macro -.395eaa e2 20 sep #$20 SEP #$20 ; set A short -.395eac af 80 e8 af lda $afe880 LDA @l GABE_MSTR_CTRL ; Turn on the SDC activity light -.395eb0 09 02 ora #$02 ORA #GABE_CTRL_SDC_LED -.395eb2 8f 80 e8 af sta $afe880 STA @l GABE_MSTR_CTRL -.395eb6 c2 10 rep #$10 REP #$10 ; set X long -.395eb8 a0 00 00 ldy #$0000 LDY #0 -.395ebb b7 06 lda [$0326],y loop_wr LDA [BIOS_BUFF_PTR],Y ; Get the byte... -.395ebd 8f 20 ea af sta $afea20 STA @l SDC_TX_FIFO_DATA_REG ; Save it to the SDC -.395ec1 c8 iny INY ; Advance to the next byte -.395ec2 c0 00 02 cpy #$0200 CPY #512 ; Have we read all the bytes? -.395ec5 d0 f4 bne $395ebb BNE loop_wr ; No: keep writing -.395ec7 a9 00 lda #$00 LDA #0 -.395ec9 8f 07 ea af sta $afea07 STA @l SDC_SD_ADDR_7_0_REG -.395ecd a5 02 lda $0322 LDA BIOS_LBA ; Set the LBA to write -.395ecf 0a asl a ASL A -.395ed0 8f 08 ea af sta $afea08 STA @l SDC_SD_ADDR_15_8_REG -.395ed4 a5 03 lda $0323 LDA BIOS_LBA+1 -.395ed6 2a rol a ROL A -.395ed7 8f 09 ea af sta $afea09 STA @l SDC_SD_ADDR_23_16_REG -.395edb a5 04 lda $0324 LDA BIOS_LBA+2 -.395edd 2a rol a ROL A -.395ede 8f 0a ea af sta $afea0a STA @l SDC_SD_ADDR_31_24_REG -.395ee2 a9 03 lda #$03 LDA #SDC_TRANS_WRITE_BLK ; Set the transaction to WRITE -.395ee4 8f 02 ea af sta $afea02 STA @l SDC_TRANS_TYPE_REG -.395ee8 a9 01 lda #$01 LDA #SDC_TRANS_START ; Set the transaction to start -.395eea 8f 03 ea af sta $afea03 STA @l SDC_TRANS_CONTROL_REG -.395eee 22 97 5d 39 jsl $395d97 JSL SDC_WAITBUSY ; Wait for transaction to complete -.395ef2 af 05 ea af lda $afea05 LDA @l SDC_TRANS_ERROR_REG ; Check for errors -.395ef6 d0 11 bne $395f09 BNE ret_error ; Is there one? Process the error -.395ef8 64 00 stz $0320 ret_success STZ BIOS_STATUS ; Return success -.395efa af 80 e8 af lda $afe880 LDA @l GABE_MSTR_CTRL ; Turn off the SDC activity light -.395efe 29 fd and #$fd AND #~GABE_CTRL_SDC_LED -.395f00 8f 80 e8 af sta $afe880 STA @l GABE_MSTR_CTRL -.395f04 28 plp PLP -.395f05 ab plb PLB -.395f06 2b pld PLD -.395f07 38 sec SEC -.395f08 6b rtl RTL -.395f09 8d 06 03 sta $0306 ret_error STA @w FDC_ST0 -.395f0c a9 82 lda #$82 LDA #BIOS_ERR_READ -.395f0e 85 00 sta $0320 STA BIOS_STATUS -.395f10 af 80 e8 af lda $afe880 LDA @l GABE_MSTR_CTRL ; Turn off the SDC activity light -.395f14 29 fd and #$fd AND #~GABE_CTRL_SDC_LED -.395f16 8f 80 e8 af sta $afe880 STA @l GABE_MSTR_CTRL -.395f1a 28 plp PLP -.395f1b ab plb PLB -.395f1c 2b pld PLD -.395f1d 18 clc CLC -.395f1e 6b rtl RTL +.395d50 SDC_TEST +.395d50 8b phb PHB +.395d51 0b phd PHD +.395d52 08 php PHP +.395d53 48 pha PHA ; begin setdbr macro +.395d54 08 php PHP +.395d55 e2 20 sep #$20 SEP #$20 ; set A short +.395d57 a9 00 lda #$00 LDA #0 +.395d59 48 pha PHA +.395d5a ab plb PLB +.395d5b 28 plp PLP +.395d5c 68 pla PLA ; end setdbr macro +.395d5d 48 pha PHA ; begin setdp macro +.395d5e 08 php PHP +.395d5f c2 20 rep #$20 REP #$20 ; set A long +.395d61 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395d64 5b tcd TCD +.395d65 28 plp PLP +.395d66 68 pla PLA ; end setdp macro +.395d67 e2 20 sep #$20 SEP #$20 ; set A short +.395d69 a9 f0 lda #$f0 LDA #$F0 ; Set white on black background +.395d6b 8d 1e 00 sta $001e STA @w CURCOLOR +.395d6e 22 a8 10 00 jsl $0010a8 JSL CLRSCREEN +.395d72 22 a0 10 00 jsl $0010a0 JSL CSRHOME +.395d76 22 b6 5d 39 jsl $395db6 JSL SDC_INIT ; Attempt to initilize the SDC interface +.395d7a b0 03 bcs $395d7f BCS init_ok +.395d7c 82 15 00 brl $395d94 BRL done +.395d7f a9 02 lda #$02 init_ok LDA #BIOS_DEV_SD +.395d81 85 01 sta $0321 STA BIOS_DEV +.395d83 22 54 45 39 jsl $394554 JSL DOS_MOUNT ; Attempt to mount the SDC +.395d87 b0 03 bcs $395d8c BCS mount_ok +.395d89 82 08 00 brl $395d94 BRL done +.395d8c 22 07 56 39 jsl $395607 mount_ok JSL IF_DIROPEN +.395d90 b0 02 bcs $395d94 BCS all_ok +.395d92 80 00 bra $395d94 BRA done +.395d94 all_ok +.395d94 22 6c 10 00 jsl $00106c done JSL PRINTCR +.395d98 28 plp PLP +.395d99 2b pld PLD +.395d9a ab plb PLB +.395d9b 6b rtl RTL +.395d9c SDC_WAITBUSY +.395d9c 08 php PHP +.395d9d e2 20 sep #$20 SEP #$20 ; set A short +.395d9f af 04 ea af lda $afea04 wait_xact LDA @l SDC_TRANS_STATUS_REG ; Wait for the transaction to complete +.395da3 29 01 and #$01 AND #SDC_TRANS_BUSY +.395da5 c9 01 cmp #$01 CMP #SDC_TRANS_BUSY +.395da7 f0 f6 beq $395d9f BEQ wait_xact +.395da9 28 plp PLP +.395daa 6b rtl RTL +.395dab SDC_RESET +.395dab 08 php PHP +.395dac e2 20 sep #$20 SEP #$20 ; set A short +.395dae a9 01 lda #$01 LDA #1 +.395db0 8f 01 ea af sta $afea01 STA @l SDC_CONTROL_REG +.395db4 28 plp PLP +.395db5 6b rtl RTL +.395db6 SDC_INIT +.395db6 0b phd PHD +.395db7 8b phb PHB +.395db8 08 php PHP +.395db9 48 pha PHA ; begin setdbr macro +.395dba 08 php PHP +.395dbb e2 20 sep #$20 SEP #$20 ; set A short +.395dbd a9 00 lda #$00 LDA #0 +.395dbf 48 pha PHA +.395dc0 ab plb PLB +.395dc1 28 plp PLP +.395dc2 68 pla PLA ; end setdbr macro +.395dc3 48 pha PHA ; begin setdp macro +.395dc4 08 php PHP +.395dc5 c2 20 rep #$20 REP #$20 ; set A long +.395dc7 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395dca 5b tcd TCD +.395dcb 28 plp PLP +.395dcc 68 pla PLA ; end setdp macro +.395dcd e2 20 sep #$20 SEP #$20 ; set A short +.395dcf a9 01 lda #$01 start_trans LDA #SDC_TRANS_INIT_SD +.395dd1 8f 02 ea af sta $afea02 STA @l SDC_TRANS_TYPE_REG ; Set Init SD +.395dd5 a9 01 lda #$01 LDA #SDC_TRANS_START ; Set the transaction to start +.395dd7 8f 03 ea af sta $afea03 STA @l SDC_TRANS_CONTROL_REG +.395ddb 22 9c 5d 39 jsl $395d9c JSL SDC_WAITBUSY ; Wait for initialization to complete +.395ddf af 05 ea af lda $afea05 LDA @l SDC_TRANS_ERROR_REG ; Check for errors +.395de3 d0 07 bne $395dec BNE ret_error ; Is there one? Process the error +.395de5 64 00 stz $0320 ret_success STZ BIOS_STATUS +.395de7 28 plp PLP +.395de8 ab plb PLB +.395de9 2b pld PLD +.395dea 38 sec SEC +.395deb 6b rtl RTL +.395dec 8d 06 03 sta $0306 ret_error STA @w FDC_ST0 +.395def a9 8b lda #$8b LDA #BIOS_ERR_NOTINIT +.395df1 85 00 sta $0320 set_error STA BIOS_STATUS +.395df3 28 plp PLP +.395df4 ab plb PLB +.395df5 2b pld PLD +.395df6 18 clc CLC +.395df7 6b rtl RTL +.395df8 SDC_GETBLOCK +.395df8 0b phd PHD +.395df9 8b phb PHB +.395dfa 08 php PHP +.395dfb 48 pha PHA ; begin setdbr macro +.395dfc 08 php PHP +.395dfd e2 20 sep #$20 SEP #$20 ; set A short +.395dff a9 00 lda #$00 LDA #0 +.395e01 48 pha PHA +.395e02 ab plb PLB +.395e03 28 plp PLP +.395e04 68 pla PLA ; end setdbr macro +.395e05 48 pha PHA ; begin setdp macro +.395e06 08 php PHP +.395e07 c2 20 rep #$20 REP #$20 ; set A long +.395e09 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395e0c 5b tcd TCD +.395e0d 28 plp PLP +.395e0e 68 pla PLA ; end setdp macro +.395e0f e2 20 sep #$20 SEP #$20 ; set A short +.395e11 af 80 e8 af lda $afe880 LDA @l GABE_MSTR_CTRL ; Turn on the SDC activity light +.395e15 09 02 ora #$02 ORA #GABE_CTRL_SDC_LED +.395e17 8f 80 e8 af sta $afe880 STA @l GABE_MSTR_CTRL +.395e1b a9 00 lda #$00 LDA #0 +.395e1d 8f 07 ea af sta $afea07 STA @l SDC_SD_ADDR_7_0_REG +.395e21 a5 02 lda $0322 LDA BIOS_LBA ; Set the LBA to read +.395e23 0a asl a ASL A +.395e24 8f 08 ea af sta $afea08 STA @l SDC_SD_ADDR_15_8_REG +.395e28 a5 03 lda $0323 LDA BIOS_LBA+1 +.395e2a 2a rol a ROL A +.395e2b 8f 09 ea af sta $afea09 STA @l SDC_SD_ADDR_23_16_REG +.395e2f a5 04 lda $0324 LDA BIOS_LBA+2 +.395e31 2a rol a ROL A +.395e32 8f 0a ea af sta $afea0a STA @l SDC_SD_ADDR_31_24_REG +.395e36 a9 02 lda #$02 LDA #SDC_TRANS_READ_BLK ; Set the transaction to READ +.395e38 8f 02 ea af sta $afea02 STA @l SDC_TRANS_TYPE_REG +.395e3c a9 01 lda #$01 LDA #SDC_TRANS_START ; Set the transaction to start +.395e3e 8f 03 ea af sta $afea03 STA @l SDC_TRANS_CONTROL_REG +.395e42 22 9c 5d 39 jsl $395d9c JSL SDC_WAITBUSY ; Wait for transaction to complete +.395e46 af 05 ea af lda $afea05 LDA @l SDC_TRANS_ERROR_REG ; Check for errors +.395e4a d0 36 bne $395e82 BNE ret_error ; Is there one? Process the error +.395e4c e2 20 sep #$20 SEP #$20 ; set A short +.395e4e af 13 ea af lda $afea13 LDA @l SDC_RX_FIFO_DATA_CNT_LO ; Record the number of bytes read +.395e52 85 0a sta $032a STA BIOS_FIFO_COUNT +.395e54 af 12 ea af lda $afea12 LDA @l SDC_RX_FIFO_DATA_CNT_HI +.395e58 85 0b sta $032b STA BIOS_FIFO_COUNT+1 +.395e5a c2 10 rep #$10 REP #$10 ; set X long +.395e5c a0 00 00 ldy #$0000 LDY #0 +.395e5f af 10 ea af lda $afea10 loop_rd LDA @l SDC_RX_FIFO_DATA_REG ; Get the byte... +.395e63 97 06 sta [$0326],y STA [BIOS_BUFF_PTR],Y ; Save it to the buffer +.395e65 c8 iny INY ; Advance to the next byte +.395e66 c0 00 02 cpy #$0200 CPY #512 ; Have we read all the bytes? +.395e69 d0 f4 bne $395e5f BNE loop_rd ; No: keep reading +.395e6b af 05 ea af lda $afea05 LDA @l SDC_TRANS_ERROR_REG ; Check for errors +.395e6f d0 11 bne $395e82 BNE ret_error ; Is there one? Process the error +.395e71 64 00 stz $0320 ret_success STZ BIOS_STATUS ; Return success +.395e73 af 80 e8 af lda $afe880 LDA @l GABE_MSTR_CTRL ; Turn off the SDC activity light +.395e77 29 fd and #$fd AND #~GABE_CTRL_SDC_LED +.395e79 8f 80 e8 af sta $afe880 STA @l GABE_MSTR_CTRL +.395e7d 28 plp PLP +.395e7e ab plb PLB +.395e7f 2b pld PLD +.395e80 38 sec SEC +.395e81 6b rtl RTL +.395e82 8d 06 03 sta $0306 ret_error STA @w FDC_ST0 +.395e85 a9 82 lda #$82 LDA #BIOS_ERR_READ +.395e87 85 00 sta $0320 STA BIOS_STATUS +.395e89 af 80 e8 af lda $afe880 LDA @l GABE_MSTR_CTRL ; Turn off the SDC activity light +.395e8d 29 fd and #$fd AND #~GABE_CTRL_SDC_LED +.395e8f 8f 80 e8 af sta $afe880 STA @l GABE_MSTR_CTRL +.395e93 28 plp PLP +.395e94 ab plb PLB +.395e95 2b pld PLD +.395e96 18 clc CLC +.395e97 6b rtl RTL +.395e98 SDC_PUTBLOCK +.395e98 0b phd PHD +.395e99 8b phb PHB +.395e9a 08 php PHP +.395e9b 48 pha PHA ; begin setdbr macro +.395e9c 08 php PHP +.395e9d e2 20 sep #$20 SEP #$20 ; set A short +.395e9f a9 00 lda #$00 LDA #0 +.395ea1 48 pha PHA +.395ea2 ab plb PLB +.395ea3 28 plp PLP +.395ea4 68 pla PLA ; end setdbr macro +.395ea5 48 pha PHA ; begin setdp macro +.395ea6 08 php PHP +.395ea7 c2 20 rep #$20 REP #$20 ; set A long +.395ea9 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.395eac 5b tcd TCD +.395ead 28 plp PLP +.395eae 68 pla PLA ; end setdp macro +.395eaf e2 20 sep #$20 SEP #$20 ; set A short +.395eb1 af 80 e8 af lda $afe880 LDA @l GABE_MSTR_CTRL ; Turn on the SDC activity light +.395eb5 09 02 ora #$02 ORA #GABE_CTRL_SDC_LED +.395eb7 8f 80 e8 af sta $afe880 STA @l GABE_MSTR_CTRL +.395ebb c2 10 rep #$10 REP #$10 ; set X long +.395ebd a0 00 00 ldy #$0000 LDY #0 +.395ec0 b7 06 lda [$0326],y loop_wr LDA [BIOS_BUFF_PTR],Y ; Get the byte... +.395ec2 8f 20 ea af sta $afea20 STA @l SDC_TX_FIFO_DATA_REG ; Save it to the SDC +.395ec6 c8 iny INY ; Advance to the next byte +.395ec7 c0 00 02 cpy #$0200 CPY #512 ; Have we read all the bytes? +.395eca d0 f4 bne $395ec0 BNE loop_wr ; No: keep writing +.395ecc a9 00 lda #$00 LDA #0 +.395ece 8f 07 ea af sta $afea07 STA @l SDC_SD_ADDR_7_0_REG +.395ed2 a5 02 lda $0322 LDA BIOS_LBA ; Set the LBA to write +.395ed4 0a asl a ASL A +.395ed5 8f 08 ea af sta $afea08 STA @l SDC_SD_ADDR_15_8_REG +.395ed9 a5 03 lda $0323 LDA BIOS_LBA+1 +.395edb 2a rol a ROL A +.395edc 8f 09 ea af sta $afea09 STA @l SDC_SD_ADDR_23_16_REG +.395ee0 a5 04 lda $0324 LDA BIOS_LBA+2 +.395ee2 2a rol a ROL A +.395ee3 8f 0a ea af sta $afea0a STA @l SDC_SD_ADDR_31_24_REG +.395ee7 a9 03 lda #$03 LDA #SDC_TRANS_WRITE_BLK ; Set the transaction to WRITE +.395ee9 8f 02 ea af sta $afea02 STA @l SDC_TRANS_TYPE_REG +.395eed a9 01 lda #$01 LDA #SDC_TRANS_START ; Set the transaction to start +.395eef 8f 03 ea af sta $afea03 STA @l SDC_TRANS_CONTROL_REG +.395ef3 22 9c 5d 39 jsl $395d9c JSL SDC_WAITBUSY ; Wait for transaction to complete +.395ef7 af 05 ea af lda $afea05 LDA @l SDC_TRANS_ERROR_REG ; Check for errors +.395efb d0 11 bne $395f0e BNE ret_error ; Is there one? Process the error +.395efd 64 00 stz $0320 ret_success STZ BIOS_STATUS ; Return success +.395eff af 80 e8 af lda $afe880 LDA @l GABE_MSTR_CTRL ; Turn off the SDC activity light +.395f03 29 fd and #$fd AND #~GABE_CTRL_SDC_LED +.395f05 8f 80 e8 af sta $afe880 STA @l GABE_MSTR_CTRL +.395f09 28 plp PLP +.395f0a ab plb PLB +.395f0b 2b pld PLD +.395f0c 38 sec SEC +.395f0d 6b rtl RTL +.395f0e 8d 06 03 sta $0306 ret_error STA @w FDC_ST0 +.395f11 a9 82 lda #$82 LDA #BIOS_ERR_READ +.395f13 85 00 sta $0320 STA BIOS_STATUS +.395f15 af 80 e8 af lda $afe880 LDA @l GABE_MSTR_CTRL ; Turn off the SDC activity light +.395f19 29 fd and #$fd AND #~GABE_CTRL_SDC_LED +.395f1b 8f 80 e8 af sta $afe880 STA @l GABE_MSTR_CTRL +.395f1f 28 plp PLP +.395f20 ab plb PLB +.395f21 2b pld PLD +.395f22 18 clc CLC +.395f23 6b rtl RTL ;****** Return to file: src\kernel.asm @@ -11540,1544 +11542,1544 @@ =13 BPB_SECPERCLUS12_OFF = 13 ; Offset to sectors per cluster in a FAT12 boot sector =17 BPB_ROOT_MAX_ENTRY12_OFF = 17 ; Offset to the maximum number of entries in the root directory in FAT12 boot sector =22 BPB_SECPERFAT12_OFF = 22 ; Offset to sectors per FAT on a FAT12 boot sector -.395f1f FDC_TEST -.395f1f 8b phb PHB -.395f20 0b phd PHD -.395f21 08 php PHP -.395f22 48 pha PHA ; begin setdbr macro -.395f23 08 php PHP -.395f24 e2 20 sep #$20 SEP #$20 ; set A short -.395f26 a9 00 lda #$00 LDA #0 -.395f28 48 pha PHA -.395f29 ab plb PLB -.395f2a 28 plp PLP -.395f2b 68 pla PLA ; end setdbr macro -.395f2c 48 pha PHA ; begin setdp macro -.395f2d 08 php PHP -.395f2e c2 20 rep #$20 REP #$20 ; set A long -.395f30 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.395f33 5b tcd TCD -.395f34 28 plp PLP -.395f35 68 pla PLA ; end setdp macro -.395f36 e2 20 sep #$20 SEP #$20 ; set A short -.395f38 a9 f0 lda #$f0 LDA #$F0 -.395f3a 8d 1e 00 sta $001e STA @w CURCOLOR -.395f3d 22 42 0b 39 jsl $390b42 JSL ICLRSCREEN -.395f41 22 66 09 39 jsl $390966 JSL ICSRHOME -.395f45 c2 30 rep #$30 REP #$30 ; set A&X long -.395f47 22 15 62 39 jsl $396215 JSL FDC_Init -.395f4b b0 03 bcs $395f50 BCS init_ok -.395f4d 82 20 00 brl $395f70 BRL motor_off -.395f50 22 14 69 39 jsl $396914 init_ok JSL FDC_CHK_MEDIA -.395f54 90 03 bcc $395f59 BCC no_media -.395f56 82 03 00 brl $395f5c BRL is_ok1 -.395f59 no_media -.395f59 82 14 00 brl $395f70 BRL motor_off -.395f5c 22 a7 67 39 jsl $3967a7 is_ok1 JSL FDC_MOUNT -.395f60 90 03 bcc $395f65 BCC mount_err -.395f62 82 03 00 brl $395f68 BRL is_ok2 -.395f65 mount_err -.395f65 82 08 00 brl $395f70 BRL motor_off -.395f68 22 7c 5f 39 jsl $395f7c is_ok2 JSL FDC_TEST_PUTBLOCK -.395f6c b0 02 bcs $395f70 BCS all_ok -.395f6e 80 00 bra $395f70 BRA motor_off -.395f70 all_ok -.395f70 22 6c 10 00 jsl $00106c motor_off JSL PRINTCR -.395f74 22 c5 62 39 jsl $3962c5 JSL FDC_Motor_Off -.395f78 28 plp PLP -.395f79 2b pld PLD -.395f7a ab plb PLB -.395f7b 6b rtl RTL -.395f7c FDC_TEST_PUTBLOCK -.395f7c e2 20 sep #$20 SEP #$20 ; set A short -.395f7e a9 00 lda #$00 LDA #0 ; Initialize the data to write to the drive -.395f80 a2 00 00 ldx #$0000 LDX #0 -.395f83 9f 00 00 03 sta $030000,x init_loop STA @l TEST_BUFFER,X -.395f87 1a inc a INC A -.395f88 e8 inx INX -.395f89 e0 00 02 cpx #$0200 CPX #512 -.395f8c d0 f5 bne $395f83 BNE init_loop -.395f8e c2 20 rep #$20 REP #$20 ; set A long -.395f90 a9 00 00 lda #$0000 LDA #<>TEST_BUFFER ; Set BIOS_BUFF_PTR -.395f93 8f 26 03 00 sta $000326 STA @l BIOS_BUFF_PTR -.395f97 a9 03 00 lda #$0003 LDA #`TEST_BUFFER -.395f9a 8f 28 03 00 sta $000328 STA @l BIOS_BUFF_PTR+2 -.395f9e a9 64 00 lda #$0064 LDA #100 ; Set LBA = 100 -.395fa1 8f 22 03 00 sta $000322 STA @l BIOS_LBA -.395fa5 a9 00 00 lda #$0000 LDA #0 -.395fa8 8f 24 03 00 sta $000324 STA @l BIOS_LBA+2 -.395fac 22 3b 67 39 jsl $39673b JSL FDC_PUTBLOCK ; Try to write the data -.395fb0 6b rtl RTL ->395fb1 40 46 3a 53 41 4d 50 4c BOOT_FILE .null "@F:SAMPLE.PGX Hello, world!" ->395fb9 45 2e 50 47 58 20 48 65 6c 6c 6f 2c 20 77 6f 72 ->395fc9 6c 64 21 00 +.395f24 FDC_TEST +.395f24 8b phb PHB +.395f25 0b phd PHD +.395f26 08 php PHP +.395f27 48 pha PHA ; begin setdbr macro +.395f28 08 php PHP +.395f29 e2 20 sep #$20 SEP #$20 ; set A short +.395f2b a9 00 lda #$00 LDA #0 +.395f2d 48 pha PHA +.395f2e ab plb PLB +.395f2f 28 plp PLP +.395f30 68 pla PLA ; end setdbr macro +.395f31 48 pha PHA ; begin setdp macro +.395f32 08 php PHP +.395f33 c2 20 rep #$20 REP #$20 ; set A long +.395f35 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.395f38 5b tcd TCD +.395f39 28 plp PLP +.395f3a 68 pla PLA ; end setdp macro +.395f3b e2 20 sep #$20 SEP #$20 ; set A short +.395f3d a9 f0 lda #$f0 LDA #$F0 +.395f3f 8d 1e 00 sta $001e STA @w CURCOLOR +.395f42 22 42 0b 39 jsl $390b42 JSL ICLRSCREEN +.395f46 22 66 09 39 jsl $390966 JSL ICSRHOME +.395f4a c2 30 rep #$30 REP #$30 ; set A&X long +.395f4c 22 1a 62 39 jsl $39621a JSL FDC_Init +.395f50 b0 03 bcs $395f55 BCS init_ok +.395f52 82 20 00 brl $395f75 BRL motor_off +.395f55 22 19 69 39 jsl $396919 init_ok JSL FDC_CHK_MEDIA +.395f59 90 03 bcc $395f5e BCC no_media +.395f5b 82 03 00 brl $395f61 BRL is_ok1 +.395f5e no_media +.395f5e 82 14 00 brl $395f75 BRL motor_off +.395f61 22 ac 67 39 jsl $3967ac is_ok1 JSL FDC_MOUNT +.395f65 90 03 bcc $395f6a BCC mount_err +.395f67 82 03 00 brl $395f6d BRL is_ok2 +.395f6a mount_err +.395f6a 82 08 00 brl $395f75 BRL motor_off +.395f6d 22 81 5f 39 jsl $395f81 is_ok2 JSL FDC_TEST_PUTBLOCK +.395f71 b0 02 bcs $395f75 BCS all_ok +.395f73 80 00 bra $395f75 BRA motor_off +.395f75 all_ok +.395f75 22 6c 10 00 jsl $00106c motor_off JSL PRINTCR +.395f79 22 ca 62 39 jsl $3962ca JSL FDC_Motor_Off +.395f7d 28 plp PLP +.395f7e 2b pld PLD +.395f7f ab plb PLB +.395f80 6b rtl RTL +.395f81 FDC_TEST_PUTBLOCK +.395f81 e2 20 sep #$20 SEP #$20 ; set A short +.395f83 a9 00 lda #$00 LDA #0 ; Initialize the data to write to the drive +.395f85 a2 00 00 ldx #$0000 LDX #0 +.395f88 9f 00 00 03 sta $030000,x init_loop STA @l TEST_BUFFER,X +.395f8c 1a inc a INC A +.395f8d e8 inx INX +.395f8e e0 00 02 cpx #$0200 CPX #512 +.395f91 d0 f5 bne $395f88 BNE init_loop +.395f93 c2 20 rep #$20 REP #$20 ; set A long +.395f95 a9 00 00 lda #$0000 LDA #<>TEST_BUFFER ; Set BIOS_BUFF_PTR +.395f98 8f 26 03 00 sta $000326 STA @l BIOS_BUFF_PTR +.395f9c a9 03 00 lda #$0003 LDA #`TEST_BUFFER +.395f9f 8f 28 03 00 sta $000328 STA @l BIOS_BUFF_PTR+2 +.395fa3 a9 64 00 lda #$0064 LDA #100 ; Set LBA = 100 +.395fa6 8f 22 03 00 sta $000322 STA @l BIOS_LBA +.395faa a9 00 00 lda #$0000 LDA #0 +.395fad 8f 24 03 00 sta $000324 STA @l BIOS_LBA+2 +.395fb1 22 40 67 39 jsl $396740 JSL FDC_PUTBLOCK ; Try to write the data +.395fb5 6b rtl RTL +>395fb6 40 46 3a 53 41 4d 50 4c BOOT_FILE .null "@F:SAMPLE.PGX Hello, world!" +>395fbe 45 2e 50 47 58 20 48 65 6c 6c 6f 2c 20 77 6f 72 +>395fce 6c 64 21 00 =$020000 TEST_LOCATION = $020000 ; Location to try to load it =$030000 TEST_BUFFER = $030000 ; Temporary location for a cluster buffer -.395fcd FDC_Check_RQM -.395fcd 0b phd PHD -.395fce 08 php PHP -.395fcf 48 pha PHA ; begin setdp macro -.395fd0 08 php PHP -.395fd1 c2 20 rep #$20 REP #$20 ; set A long -.395fd3 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.395fd6 5b tcd TCD -.395fd7 28 plp PLP -.395fd8 68 pla PLA ; end setdp macro -.395fd9 e2 20 sep #$20 SEP #$20 ; set A short -.395fdb a9 1e lda #$1e LDA #FDC_WAIT_TIME ; Set a time out for the loop -.395fdd 22 03 41 39 jsl $394103 JSL ISETTIMEOUT -.395fe1 a5 2c lda $032c loop LDA @b BIOS_FLAGS ; Check if there was a time out -.395fe3 30 12 bmi $395ff7 BMI time_out ; If so: signal a time out -.395fe5 af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR -.395fe9 89 80 bit #$80 BIT #FDC_MSR_RQM -.395feb f0 f4 beq $395fe1 BEQ loop -.395fed a9 00 lda #$00 LDA #0 ; Clear the time out -.395fef 22 03 41 39 jsl $394103 JSL ISETTIMEOUT -.395ff3 28 plp PLP -.395ff4 2b pld PLD -.395ff5 38 sec SEC -.395ff6 60 rts RTS -.395ff7 28 plp time_out PLP -.395ff8 2b pld PLD -.395ff9 18 clc CLC -.395ffa 60 rts RTS -.395ffb FDC_Check_DRV0_BSY -.395ffb 0b phd PHD -.395ffc 08 php PHP -.395ffd 48 pha PHA ; begin setdp macro -.395ffe 08 php PHP -.395fff c2 20 rep #$20 REP #$20 ; set A long -.396001 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.396004 5b tcd TCD -.396005 28 plp PLP -.396006 68 pla PLA ; end setdp macro -.396007 e2 20 sep #$20 SEP #$20 ; set A short -.396009 a9 1e lda #$1e LDA #FDC_WAIT_TIME ; Set a time out for the loop -.39600b 22 03 41 39 jsl $394103 JSL ISETTIMEOUT -.39600f a5 2c lda $032c loop LDA @b BIOS_FLAGS ; Check if there was a time out -.396011 30 12 bmi $396025 BMI time_out ; If so: signal a time out -.396013 af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR -.396017 89 01 bit #$01 BIT #FDC_MSR_DRV0BSY -.396019 d0 f4 bne $39600f BNE loop -.39601b a9 00 lda #$00 LDA #0 ; Clear the time out -.39601d 22 03 41 39 jsl $394103 JSL ISETTIMEOUT -.396021 28 plp PLP -.396022 2b pld PLD -.396023 38 sec SEC -.396024 60 rts RTS -.396025 28 plp time_out PLP -.396026 2b pld PLD -.396027 18 clc CLC -.396028 60 rts RTS -.396029 FDC_Check_CMD_BSY -.396029 0b phd PHD -.39602a 08 php PHP -.39602b 48 pha PHA ; begin setdp macro -.39602c 08 php PHP -.39602d c2 20 rep #$20 REP #$20 ; set A long -.39602f a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.396032 5b tcd TCD -.396033 28 plp PLP -.396034 68 pla PLA ; end setdp macro -.396035 e2 20 sep #$20 SEP #$20 ; set A short -.396037 a9 1e lda #$1e LDA #FDC_WAIT_TIME ; Set a time out for the loop -.396039 22 03 41 39 jsl $394103 JSL ISETTIMEOUT -.39603d a5 2c lda $032c loop LDA @b BIOS_FLAGS ; Check if there was a time out -.39603f 30 12 bmi $396053 BMI time_out ; If so: signal a time out -.396041 af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR -.396045 89 10 bit #$10 BIT #FDC_MSR_CMDBSY -.396047 d0 f4 bne $39603d BNE loop -.396049 a9 00 lda #$00 LDA #0 ; Clear the time out -.39604b 22 03 41 39 jsl $394103 JSL ISETTIMEOUT -.39604f 28 plp PLP -.396050 2b pld PLD -.396051 38 sec SEC -.396052 60 rts RTS -.396053 28 plp time_out PLP -.396054 2b pld PLD -.396055 18 clc CLC -.396056 60 rts RTS -.396057 FDC_Can_Read_Data -.396057 0b phd PHD -.396058 08 php PHP -.396059 48 pha PHA ; begin setdp macro -.39605a 08 php PHP -.39605b c2 20 rep #$20 REP #$20 ; set A long -.39605d a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.396060 5b tcd TCD -.396061 28 plp PLP -.396062 68 pla PLA ; end setdp macro -.396063 e2 20 sep #$20 SEP #$20 ; set A short -.396065 a9 1e lda #$1e LDA #FDC_WAIT_TIME ; Set a time out for the loop -.396067 22 03 41 39 jsl $394103 JSL ISETTIMEOUT -.39606b a5 2c lda $032c loop LDA @b BIOS_FLAGS ; Check if there was a time out -.39606d 30 14 bmi $396083 BMI time_out ; If so: signal a time out -.39606f af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR -.396073 29 40 and #$40 AND #FDC_MSR_DIO -.396075 c9 40 cmp #$40 CMP #FDC_MSR_DIO -.396077 d0 f2 bne $39606b BNE loop -.396079 a9 00 lda #$00 LDA #0 ; Clear the time out -.39607b 22 03 41 39 jsl $394103 JSL ISETTIMEOUT -.39607f 28 plp PLP -.396080 2b pld PLD -.396081 38 sec SEC -.396082 60 rts RTS -.396083 28 plp time_out PLP -.396084 2b pld PLD -.396085 18 clc CLC -.396086 60 rts RTS -.396087 FDC_CAN_WRITE -.396087 0b phd PHD -.396088 08 php PHP -.396089 48 pha PHA ; begin setdp macro -.39608a 08 php PHP -.39608b c2 20 rep #$20 REP #$20 ; set A long -.39608d a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.396090 5b tcd TCD -.396091 28 plp PLP -.396092 68 pla PLA ; end setdp macro -.396093 e2 20 sep #$20 SEP #$20 ; set A short -.396095 a9 1e lda #$1e LDA #FDC_WAIT_TIME ; Set a time out for the loop -.396097 22 03 41 39 jsl $394103 JSL ISETTIMEOUT -.39609b a5 2c lda $032c loop LDA @b BIOS_FLAGS ; Check if there was a time out -.39609d 30 14 bmi $3960b3 BMI time_out ; If so: signal a time out -.39609f af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR -.3960a3 29 c0 and #$c0 AND #FDC_MSR_RQM | FDC_MSR_DIO -.3960a5 c9 80 cmp #$80 CMP #FDC_MSR_RQM -.3960a7 d0 f2 bne $39609b BNE loop -.3960a9 a9 00 lda #$00 LDA #0 ; Clear the time out -.3960ab 22 03 41 39 jsl $394103 JSL ISETTIMEOUT -.3960af 28 plp PLP -.3960b0 2b pld PLD -.3960b1 38 sec SEC -.3960b2 60 rts RTS -.3960b3 28 plp time_out PLP -.3960b4 2b pld PLD -.3960b5 18 clc CLC -.3960b6 60 rts RTS -.3960b7 FDC_DELAY_10MS -.3960b7 da phx PHX -.3960b8 08 php PHP -.3960b9 c2 10 rep #$10 REP #$10 ; set X long -.3960bb a2 80 3e ldx #$3e80 LDX #16000 ; Wait for around 10ms -.3960be ea nop loop NOP ; Each iteration should take 9 cycles -.3960bf ca dex DEX -.3960c0 e0 00 00 cpx #$0000 CPX #0 -.3960c3 d0 f9 bne $3960be BNE loop -.3960c5 28 plp PLP -.3960c6 fa plx PLX -.3960c7 6b rtl RTL -.3960c8 FDC_COMMAND -.3960c8 da phx PHX -.3960c9 8b phb PHB -.3960ca 0b phd PHD -.3960cb 08 php PHP -.3960cc 48 pha PHA ; begin setdbr macro -.3960cd 08 php PHP -.3960ce e2 20 sep #$20 SEP #$20 ; set A short -.3960d0 a9 00 lda #$00 LDA #0 -.3960d2 48 pha PHA -.3960d3 ab plb PLB -.3960d4 28 plp PLP -.3960d5 68 pla PLA ; end setdbr macro -.3960d6 48 pha PHA ; begin setdp macro -.3960d7 08 php PHP -.3960d8 c2 20 rep #$20 REP #$20 ; set A long -.3960da a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.3960dd 5b tcd TCD -.3960de 28 plp PLP -.3960df 68 pla PLA ; end setdp macro -.3960e0 22 b7 60 39 jsl $3960b7 JSL FDC_DELAY_10MS ; Wait around 10ms -.3960e4 e2 30 sep #$30 SEP #$30 ; set A&X short -.3960e6 a2 00 ldx #$00 LDX #0 -.3960e8 a9 00 lda #$00 LDA #0 -.3960ea 9d 10 05 sta $0510,x clr_results STA FDC_RESULTS,X ; Clear the result buffer -.3960ed e8 inx INX -.3960ee e0 10 cpx #$10 CPX #16 -.3960f0 d0 f8 bne $3960ea BNE clr_results -.3960f2 af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR ; Validate we can send a command -.3960f6 29 c0 and #$c0 AND #FDC_MSR_RQM | FDC_MSR_DIO -.3960f8 c9 80 cmp #$80 CMP #FDC_MSR_RQM -.3960fa f0 04 beq $396100 BEQ start_send ; If so, start sending -.3960fc 22 15 62 39 jsl $396215 fdc_reset JSL FDC_INIT ; Reset the FDC -.396100 start_send -.396100 e2 10 sep #$10 SEP #$10 ; set X short -.396102 a2 00 ldx #$00 LDX #0 -.396104 20 cd 5f jsr $395fcd send_loop JSR FDC_Check_RQM ; Wait until we can write -.396107 b0 03 bcs $39610c BCS send_param -.396109 82 5e 00 brl $39616a BRL time_out ; If there was a timeout, flag the time out -.39610c bd 00 05 lda $0500,x send_param LDA FDC_PARAMETERS,X ; Get the parameter/command byte to write -.39610f 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA ; Send it -.396113 22 b7 60 39 jsl $3960b7 JSL FDC_DELAY_10MS ; Wait around 10ms for things to settle -.396117 e8 inx INX ; Advance to the next byte -.396118 ec 30 05 cpx $0530 CPX FDC_PARAM_NUM -.39611b d0 e7 bne $396104 BNE send_loop ; Keep sending until we've sent them all -.39611d ad 33 05 lda $0533 LDA FDC_EXPECT_DAT ; Check the data expectation byte -.396120 d0 03 bne $396125 BNE chk_data_dir -.396122 82 80 00 brl $3961a5 BRL result_phase ; If 0: we just want a result -.396125 10 3c bpl $396163 chk_data_dir BPL rd_data ; If >0: we want to read data -.396127 wr_data -.396127 a5 0b lda $030b wr_data_rdy LDA FDC_STATUS ; Check that the motor is still spinning -.396129 30 03 bmi $39612e BMI wr_chk_rqm -.39612b 82 3c 00 brl $39616a BRL time_out ; If not, raise an error -.39612e af f4 13 af lda $af13f4 wr_chk_rqm LDA @l SIO_FDC_MSR ; Wait for ready to write -.396132 89 80 bit #$80 BIT #FDC_MSR_RQM -.396134 f0 f1 beq $396127 BEQ wr_data_rdy -.396136 89 20 bit #$20 BIT #FDC_MSR_NONDMA ; Check if in execution mode -.396138 d0 03 bne $39613d BNE wr_data_phase ; If so: transfer the data -.39613a 82 68 00 brl $3961a5 BRL result_phase ; If not: it's an error -.39613d wr_data_phase -.39613d c2 10 rep #$10 REP #$10 ; set X long -.39613f a0 00 00 ldy #$0000 LDY #0 -.396142 a5 0b lda $030b wr_data_loop LDA FDC_STATUS ; Check that the motor is still spinning -.396144 30 03 bmi $396149 BMI wr_chk_nondma -.396146 82 21 00 brl $39616a BRL time_out ; If not, raise an error -.396149 af f4 13 af lda $af13f4 wr_chk_nondma LDA @l SIO_FDC_MSR ; Check to see if the FDC is in execution phase -.39614d 89 20 bit #$20 BIT #FDC_MSR_NONDMA -.39614f f0 54 beq $3961a5 BEQ result_phase ; If not: break out to result phase -.396151 89 80 bit #$80 BIT #FDC_MSR_RQM ; Check if we can read data -.396153 f0 ed beq $396142 BEQ wr_data_loop ; No: keep waiting -.396155 b7 26 lda [$0326],y LDA [BIOS_BUFF_PTR],Y ; Get the data byte -.396157 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA ; And save it to the buffer -.39615b c8 iny INY ; Move to the next position -.39615c c0 00 02 cpy #$0200 CPY #512 ; TODO: set this from the parameters? -.39615f d0 e1 bne $396142 BNE wr_data_loop ; If not at the end, keep fetching -.396161 80 42 bra $3961a5 BRA result_phase ; ready for the result phase -.396163 20 57 60 jsr $396057 rd_data JSR FDC_Can_Read_Data -.396166 a5 0b lda $030b rd_data_rdy LDA FDC_STATUS ; Check that the motor is still spinning -.396168 30 07 bmi $396171 BMI chk_rd_rdy ; If so, check to see if the data is ready -.39616a time_out -.39616a e2 20 sep #$20 SEP #$20 ; set A short -.39616c a9 8c lda #$8c LDA #BIOS_ERR_TIMEOUT ; Otherwise: throw a BIOS_ERR_TIMEOUT error -.39616e 82 9c 00 brl $39620d BRL pass_error -.396171 af f4 13 af lda $af13f4 chk_rd_rdy LDA @l SIO_FDC_MSR ; Wait for data to be ready -.396175 29 c0 and #$c0 AND #FDC_MSR_RQM | FDC_MSR_DIO -.396177 c9 c0 cmp #$c0 CMP #FDC_MSR_RQM | FDC_MSR_DIO -.396179 d0 eb bne $396166 BNE rd_data_rdy -.39617b af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR ; Check to see if the FDC is in execution phase -.39617f 89 20 bit #$20 BIT #FDC_MSR_NONDMA -.396181 d0 03 bne $396186 BNE rd_data_phase ; If so: transfer the data -.396183 82 83 00 brl $396209 BRL error ; If not: it's an error -.396186 rd_data_phase -.396186 c2 10 rep #$10 REP #$10 ; set X long -.396188 a0 00 00 ldy #$0000 LDY #0 -.39618b a5 0b lda $030b rd_data_loop LDA FDC_STATUS ; Check that the motor is still spinning -.39618d 10 db bpl $39616a BPL time_out ; If not: throw a timeout error -.39618f af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR ; Wait for the next byte to be ready -.396193 29 c0 and #$c0 AND #FDC_MSR_RQM | FDC_MSR_DIO -.396195 c9 c0 cmp #$c0 CMP #FDC_MSR_RQM | FDC_MSR_DIO -.396197 d0 f2 bne $39618b BNE rd_data_loop -.396199 af f5 13 af lda $af13f5 LDA @l SIO_FDC_DTA ; Get the data byte -.39619d 97 26 sta [$0326],y STA [BIOS_BUFF_PTR],Y ; And save it to the buffer -.39619f c8 iny INY ; Move to the next position -.3961a0 c0 00 02 cpy #$0200 CPY #512 ; TODO: set this from the parameters? -.3961a3 d0 e6 bne $39618b BNE rd_data_loop ; If not at the end, keep fetching -.3961a5 ad 32 05 lda $0532 result_phase LDA FDC_RESULT_NUM ; If no results are expected... -.3961a8 f0 34 beq $3961de BEQ chk_busy ; Then we're done -.3961aa e2 10 sep #$10 SEP #$10 ; set X short -.3961ac a2 00 ldx #$00 LDX #0 -.3961ae a9 1e lda #$1e LDA #FDC_WAIT_TIME ; Set the watchdog timer -.3961b0 22 03 41 39 jsl $394103 JSL ISETTIMEOUT -.3961b4 20 57 60 jsr $396057 result_loop JSR FDC_Can_Read_Data ; Wait until we can read -.3961b7 90 b1 bcc $39616a BCC time_out ; If there was a time out, raise an error -.3961b9 af f5 13 af lda $af13f5 LDA @l SIO_FDC_DTA ; Yes: get the data -.3961bd 20 57 60 jsr $396057 JSR FDC_Can_Read_Data ; Wait until we can read -.3961c0 90 a8 bcc $39616a BCC time_out ; If there was a time out, raise an error -.3961c2 af f5 13 af lda $af13f5 read_result LDA @l SIO_FDC_DTA ; Yes: get the data -.3961c6 9d 10 05 sta $0510,x STA FDC_RESULTS,X ; Save it to the result buffer -.3961c9 20 cd 5f jsr $395fcd JSR FDC_Check_RQM -.3961cc 90 9c bcc $39616a BCC time_out ; If there was a time out, flag the error -.3961ce af f4 13 af lda $af13f4 rd_chk_1 LDA @l SIO_FDC_MSR -.3961d2 29 50 and #$50 AND #FDC_MSR_DIO | FDC_MSR_CMDBSY -.3961d4 c9 50 cmp #$50 CMP #FDC_MSR_DIO | FDC_MSR_CMDBSY -.3961d6 d0 06 bne $3961de BNE chk_busy -.3961d8 e8 inx INX ; Move to the next result positions -.3961d9 ec 32 05 cpx $0532 CPX FDC_RESULT_NUM -.3961dc d0 e4 bne $3961c2 BNE read_result ; And keep looping until we've read all -.3961de chk_busy -.3961de c2 10 rep #$10 REP #$10 ; set X long -.3961e0 a2 0a 00 ldx #$000a LDX #10 ; Wait 10ms (I guess?) -.3961e3 22 19 16 39 jsl $391619 JSL ILOOP_MS -.3961e7 af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR ; Check the command busy bit -.3961eb 89 10 bit #$10 BIT #FDC_MSR_CMDBSY -.3961ed f0 12 beq $396201 BEQ done ; If not set: we're done -.3961ef 20 57 60 jsr $396057 JSR FDC_Can_Read_Data ; Wait until we can read -.3961f2 b0 03 bcs $3961f7 BCS get_result_byte -.3961f4 82 73 ff brl $39616a BRL time_out ; If there was a time out, flag the error -.3961f7 af f5 13 af lda $af13f5 get_result_byte LDA @l SIO_FDC_DTA ; Read the data -.3961fb 9d 10 05 sta $0510,x STA FDC_RESULTS,X -.3961fe e8 inx INX -.3961ff 80 dd bra $3961de BRA chk_busy ; And keep checking -.396201 done -.396201 64 20 stz $0320 STZ BIOS_STATUS -.396203 28 plp PLP -.396204 2b pld PLD -.396205 ab plb PLB -.396206 fa plx PLX -.396207 38 sec SEC -.396208 6b rtl RTL -.396209 error -.396209 e2 20 sep #$20 SEP #$20 ; set A short -.39620b a9 85 lda #$85 LDA #BIOS_ERR_CMD -.39620d 85 20 sta $0320 pass_error STA BIOS_STATUS -.39620f 28 plp PLP -.396210 2b pld PLD -.396211 ab plb PLB -.396212 fa plx PLX -.396213 18 clc CLC -.396214 6b rtl RTL -.396215 FDC_Init -.396215 08 php PHP -.396216 c2 10 rep #$10 REP #$10 ; set X long -.396218 e2 20 sep #$20 SEP #$20 ; set A short -.39621a a9 00 lda #$00 LDA #0 -.39621c 8f f2 13 af sta $af13f2 STA @l SIO_FDC_DOR -.396220 a2 e8 03 ldx #$03e8 LDX #1000 ; Wait -.396223 a0 00 00 ldy #$0000 LDY #0 -.396226 22 26 16 39 jsl $391626 JSL IDELAY -.39622a a9 04 lda #$04 LDA #FDC_DOR_NRESET ; Reset the FDC -.39622c 8f f2 13 af sta $af13f2 STA @l SIO_FDC_DOR -.396230 ea nop NOP -.396231 ea nop NOP -.396232 ea nop NOP -.396233 ea nop NOP -.396234 a9 00 lda #$00 LDA #$00 ; Make sure the Speed and Compensation has been set -.396236 8f f4 13 af sta $af13f4 STA @l SIO_FDC_DSR -.39623a a9 00 lda #$00 LDA #$00 ; Precompensation set to 0 -.39623c 8f f7 13 af sta $af13f7 STA @l SIO_FDC_CCR -.396240 a2 8f c5 ldx #$c58f LDX #<>FDC_SEEK_TIME -.396243 a0 20 00 ldy #$0020 LDY #`FDC_SEEK_TIME -.396246 22 26 16 39 jsl $391626 JSL IDELAY -.39624a 22 25 63 39 jsl $396325 JSL FDC_Sense_Int_Status -.39624e 90 25 bcc $396275 BCC pass_failure -.396250 22 25 63 39 jsl $396325 JSL FDC_Sense_Int_Status -.396254 90 1f bcc $396275 BCC pass_failure -.396256 22 25 63 39 jsl $396325 JSL FDC_Sense_Int_Status -.39625a 90 19 bcc $396275 BCC pass_failure -.39625c 22 25 63 39 jsl $396325 JSL FDC_Sense_Int_Status -.396260 90 13 bcc $396275 BCC pass_failure -.396262 22 e7 63 39 jsl $3963e7 JSL FDC_Configure_Command -.396266 90 0d bcc $396275 BCC pass_failure -.396268 22 8e 63 39 jsl $39638e JSL FDC_Specify_Command -.39626c 90 07 bcc $396275 BCC pass_failure -.39626e 22 91 62 39 jsl $396291 JSL FDC_Motor_On -.396272 28 plp PLP -.396273 38 sec SEC -.396274 6b rtl RTL -.396275 28 plp pass_failure PLP -.396276 18 clc CLC -.396277 6b rtl RTL -.396278 FDC_MOTOR_NEEDED -.396278 08 php PHP -.396279 c2 20 rep #$20 REP #$20 ; set A long -.39627b 78 sei SEI ; Turn off interrupts -.39627c a9 84 03 lda #$0384 LDA #FDC_MOTOR_ON_TIME ; Reset the FDC timeout clock -.39627f 8f 4e a0 38 sta $38a04e STA @l FDC_MOTOR_TIMER -.396283 e2 20 sep #$20 SEP #$20 ; set A short -.396285 af 4c 01 00 lda $00014c LDA @l INT_MASK_REG0 -.396289 29 fe and #$fe AND #~FNX0_INT00_SOF ; Enable the SOF interrupt -.39628b 8f 4c 01 00 sta $00014c STA @l INT_MASK_REG0 -.39628f 28 plp PLP -.396290 6b rtl RTL -.396291 FDC_Motor_On -.396291 08 php PHP -.396292 22 78 62 39 jsl $396278 JSL FDC_MOTOR_NEEDED ; Reset the spindle motor timeout clock -.396296 e2 20 sep #$20 SEP #$20 ; set A short -.396298 af f2 13 af lda $af13f2 LDA @l SIO_FDC_DOR ; Check to see if the motor is already on -.39629c 89 10 bit #$10 BIT #FDC_DOR_MOT0 -.39629e d0 1f bne $3962bf BNE done ; If so: skip -.3962a0 a9 14 lda #$14 LDA #FDC_DOR_MOT0 | FDC_DOR_NRESET -.3962a2 8f f2 13 af sta $af13f2 STA @l SIO_FDC_DOR -.3962a6 20 cd 5f jsr $395fcd JSR FDC_Check_RQM ; Make sure we can leave knowing that everything set properly -.3962a9 90 17 bcc $3962c2 BCC time_out -.3962ab a2 1e 8b ldx #$8b1e LDX #<>FDC_MOTOR_TIME ; Wait a suitable time for the motor to spin up -.3962ae a0 41 00 ldy #$0041 LDY #`FDC_MOTOR_TIME -.3962b1 22 26 16 39 jsl $391626 JSL IDELAY -.3962b5 af 0b 03 00 lda $00030b LDA @l FDC_STATUS -.3962b9 09 80 ora #$80 ORA #$80 ; Flag that the motor should be on -.3962bb 8f 0b 03 00 sta $00030b STA @l FDC_STATUS -.3962bf 28 plp done PLP -.3962c0 38 sec SEC -.3962c1 6b rtl RTL -.3962c2 28 plp time_out PLP ; Return a timeout error -.3962c3 18 clc CLC -.3962c4 6b rtl RTL -.3962c5 FDC_Motor_Off -.3962c5 08 php PHP -.3962c6 e2 20 sep #$20 SEP #$20 ; set A short -.3962c8 a9 04 lda #$04 LDA #FDC_DOR_NRESET -.3962ca 8f f2 13 af sta $af13f2 STA @L SIO_FDC_DOR -.3962ce c2 20 rep #$20 REP #$20 ; set A long -.3962d0 78 sei SEI ; Turn off interrupts -.3962d1 a9 00 00 lda #$0000 LDA #0 ; Set FDC motor timeout counter to 0 to disable it -.3962d4 8f 4e a0 38 sta $38a04e STA @l FDC_MOTOR_TIMER -.3962d8 e2 20 sep #$20 SEP #$20 ; set A short -.3962da af 4c 01 00 lda $00014c LDA @l INT_MASK_REG0 -.3962de 09 01 ora #$01 ORA #FNX0_INT00_SOF ; Disable the SOF interrupt -.3962e0 8f 4c 01 00 sta $00014c STA @l INT_MASK_REG0 -.3962e4 af 0b 03 00 lda $00030b LDA @l FDC_STATUS -.3962e8 29 7f and #$7f AND #$7F ; Flag that the motor should be off -.3962ea 8f 0b 03 00 sta $00030b STA @l FDC_STATUS -.3962ee 28 plp PLP -.3962ef 6b rtl RTL -.3962f0 FDC_Recalibrate_Command -.3962f0 0b phd PHD -.3962f1 08 php PHP -.3962f2 48 pha PHA ; begin setdp macro -.3962f3 08 php PHP -.3962f4 c2 20 rep #$20 REP #$20 ; set A long -.3962f6 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.3962f9 5b tcd TCD -.3962fa 28 plp PLP -.3962fb 68 pla PLA ; end setdp macro -.3962fc 22 78 62 39 jsl $396278 JSL FDC_MOTOR_NEEDED ; Reset the spindle motor timeout clock -.396300 e2 20 sep #$20 SEP #$20 ; set A short -.396302 a9 07 lda #$07 LDA #FDC_CMD_RECALIBRATE ; RECALIBRATE Command -.396304 8d 00 05 sta $0500 STA FDC_PARAMETERS -.396307 a5 00 lda $0300 LDA FDC_DRIVE -.396309 8d 01 05 sta $0501 STA FDC_PARAMETERS+1 -.39630c a9 02 lda #$02 LDA #2 -.39630e 8d 30 05 sta $0530 STA FDC_PARAM_NUM ; 2 parameters -.396311 9c 33 05 stz $0533 STZ FDC_EXPECT_DAT ; 0 data -.396314 9c 32 05 stz $0532 STZ FDC_RESULT_NUM ; 0 results -.396317 22 c8 60 39 jsl $3960c8 JSL FDC_COMMAND ; Issue the command -.39631b 90 04 bcc $396321 BCC pass_failure ; If failure, pass the failure up -.39631d 28 plp PLP -.39631e 2b pld PLD -.39631f 38 sec SEC -.396320 6b rtl RTL -.396321 28 plp pass_failure PLP -.396322 2b pld PLD -.396323 18 clc CLC -.396324 6b rtl RTL -.396325 FDC_Sense_Int_Status -.396325 8b phb PHB -.396326 0b phd PHD -.396327 08 php PHP -.396328 48 pha PHA ; begin setdbr macro -.396329 08 php PHP -.39632a e2 20 sep #$20 SEP #$20 ; set A short -.39632c a9 00 lda #$00 LDA #0 -.39632e 48 pha PHA -.39632f ab plb PLB -.396330 28 plp PLP -.396331 68 pla PLA ; end setdbr macro -.396332 48 pha PHA ; begin setdp macro -.396333 08 php PHP -.396334 c2 20 rep #$20 REP #$20 ; set A long -.396336 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.396339 5b tcd TCD -.39633a 28 plp PLP -.39633b 68 pla PLA ; end setdp macro -.39633c c2 30 rep #$30 REP #$30 ; set A&X long -.39633e a2 0a 00 ldx #$000a LDX #10 ; Wait for 10ms -.396341 22 19 16 39 jsl $391619 JSL ILOOP_MS -.396345 e2 20 sep #$20 SEP #$20 ; set A short -.396347 64 06 stz $0306 STZ FDC_ST0 ; Clear ST0 -.396349 a9 ff lda #$ff LDA #$FF -.39634b 85 0a sta $030a STA FDC_PCN ; Set PCN to some obviously bad value -.39634d 20 29 60 jsr $396029 JSR FDC_Check_CMD_BSY ; Check I can send a command -.396350 90 30 bcc $396382 BCC time_out ; If there was a time out, raise an error -.396352 20 cd 5f jsr $395fcd JSR FDC_Check_RQM ; Check if I can transfer data -.396355 90 2b bcc $396382 BCC time_out ; If there was a time out, raise an error -.396357 a9 08 lda #$08 LDA #FDC_CMD_SENSE_INTERRUPT -.396359 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA -.39635d 20 57 60 jsr $396057 JSR FDC_Can_Read_Data -.396360 90 20 bcc $396382 BCC time_out ; If there was a time out, raise an error -.396362 20 cd 5f jsr $395fcd JSR FDC_Check_RQM ; Check if I can transfer data -.396365 90 1b bcc $396382 BCC time_out ; If there was a time out, raise an error -.396367 af f5 13 af lda $af13f5 LDA @l SIO_FDC_DTA -.39636b 85 06 sta $0306 STA FDC_ST0 ; --- ST0 --- -.39636d 20 cd 5f jsr $395fcd JSR FDC_Check_RQM ; Check if I can transfer data -.396370 90 10 bcc $396382 BCC time_out ; If there was a time out, raise an error -.396372 af f5 13 af lda $af13f5 LDA @l SIO_FDC_DTA -.396376 85 0a sta $030a STA FDC_PCN ; --- Cylinder --- -.396378 e2 20 sep #$20 SEP #$20 ; set A short -.39637a 9c 20 03 stz $0320 STZ @w BIOS_STATUS -.39637d 28 plp PLP -.39637e 2b pld PLD -.39637f ab plb PLB -.396380 38 sec SEC -.396381 6b rtl RTL -.396382 time_out -.396382 e2 20 sep #$20 SEP #$20 ; set A short -.396384 a9 8c lda #$8c LDA #BIOS_ERR_TIMEOUT ; Return a time out error -.396386 8d 20 03 sta $0320 STA @w BIOS_STATUS -.396389 28 plp PLP -.39638a 2b pld PLD -.39638b ab plb PLB -.39638c 18 clc CLC -.39638d 6b rtl RTL -.39638e FDC_Specify_Command -.39638e 8b phb PHB -.39638f 0b phd PHD -.396390 08 php PHP -.396391 48 pha PHA ; begin setdbr macro -.396392 08 php PHP -.396393 e2 20 sep #$20 SEP #$20 ; set A short -.396395 a9 00 lda #$00 LDA #0 -.396397 48 pha PHA -.396398 ab plb PLB -.396399 28 plp PLP -.39639a 68 pla PLA ; end setdbr macro -.39639b 48 pha PHA ; begin setdp macro -.39639c 08 php PHP -.39639d c2 20 rep #$20 REP #$20 ; set A long -.39639f a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.3963a2 5b tcd TCD -.3963a3 28 plp PLP -.3963a4 68 pla PLA ; end setdp macro -.3963a5 c2 30 rep #$30 REP #$30 ; set A&X long -.3963a7 a2 0a 00 ldx #$000a LDX #10 ; Wait for 10ms -.3963aa 22 19 16 39 jsl $391619 JSL ILOOP_MS -.3963ae e2 20 sep #$20 SEP #$20 ; set A short -.3963b0 20 29 60 jsr $396029 JSR FDC_Check_CMD_BSY ; Check I can send a command -.3963b3 90 26 bcc $3963db BCC time_out ; If there was a time out, raise an error -.3963b5 20 cd 5f jsr $395fcd JSR FDC_Check_RQM ; Check if I can transfer data -.3963b8 90 21 bcc $3963db BCC time_out ; If there was a time out, raise an error -.3963ba a9 03 lda #$03 LDA #FDC_CMD_SPECIFY ; Specify Command -.3963bc 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA -.3963c0 20 cd 5f jsr $395fcd JSR FDC_Check_RQM ; Check if I can transfer data -.3963c3 90 16 bcc $3963db BCC time_out ; If there was a time out, raise an error -.3963c5 a9 cf lda #$cf LDA #$CF -.3963c7 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA -.3963cb 20 cd 5f jsr $395fcd JSR FDC_Check_RQM ; Check if I can transfer data -.3963ce 90 0b bcc $3963db BCC time_out ; If there was a time out, raise an error -.3963d0 a9 01 lda #$01 LDA #$01 ; 1 = Non-DMA -.3963d2 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA -.3963d6 28 plp PLP -.3963d7 2b pld PLD -.3963d8 ab plb PLB -.3963d9 38 sec SEC -.3963da 6b rtl RTL -.3963db time_out -.3963db e2 20 sep #$20 SEP #$20 ; set A short -.3963dd a9 8c lda #$8c LDA #BIOS_ERR_TIMEOUT ; Return a time out error -.3963df 8d 20 03 sta $0320 STA @w BIOS_STATUS -.3963e2 28 plp PLP -.3963e3 2b pld PLD -.3963e4 ab plb PLB -.3963e5 18 clc CLC -.3963e6 6b rtl RTL -.3963e7 FDC_Configure_Command -.3963e7 8b phb PHB -.3963e8 0b phd PHD -.3963e9 08 php PHP -.3963ea 48 pha PHA ; begin setdbr macro -.3963eb 08 php PHP -.3963ec e2 20 sep #$20 SEP #$20 ; set A short -.3963ee a9 00 lda #$00 LDA #0 -.3963f0 48 pha PHA -.3963f1 ab plb PLB -.3963f2 28 plp PLP -.3963f3 68 pla PLA ; end setdbr macro -.3963f4 48 pha PHA ; begin setdp macro -.3963f5 08 php PHP -.3963f6 c2 20 rep #$20 REP #$20 ; set A long -.3963f8 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.3963fb 5b tcd TCD -.3963fc 28 plp PLP -.3963fd 68 pla PLA ; end setdp macro -.3963fe c2 30 rep #$30 REP #$30 ; set A&X long -.396400 a2 0a 00 ldx #$000a LDX #10 ; Wait for 10ms -.396403 22 19 16 39 jsl $391619 JSL ILOOP_MS -.396407 e2 20 sep #$20 SEP #$20 ; set A short -.396409 20 29 60 jsr $396029 JSR FDC_Check_CMD_BSY ; Check I can send a command -.39640c 90 36 bcc $396444 BCC time_out ; If there was a time out, raise an error -.39640e 20 cd 5f jsr $395fcd JSR FDC_Check_RQM ; Check if I can transfer data -.396411 90 31 bcc $396444 BCC time_out ; If there was a time out, raise an error -.396413 a9 13 lda #$13 LDA #FDC_CMD_CONFIGURE ; Specify Command -.396415 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA -.396419 20 cd 5f jsr $395fcd JSR FDC_Check_RQM ; Check if I can transfer data -.39641c 90 26 bcc $396444 BCC time_out ; If there was a time out, raise an error -.39641e a9 00 lda #$00 LDA #$00 -.396420 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA -.396424 20 cd 5f jsr $395fcd JSR FDC_Check_RQM ; Check if I can transfer data -.396427 90 1b bcc $396444 BCC time_out ; If there was a time out, raise an error -.396429 a9 44 lda #$44 LDA #$44 ; Implied Seek, FIFOTHR = 4 byte -.39642b 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA -.39642f 20 cd 5f jsr $395fcd JSR FDC_Check_RQM ; Check if I can transfer data -.396432 90 10 bcc $396444 BCC time_out ; If there was a time out, raise an error -.396434 a9 00 lda #$00 LDA #$00 -.396436 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA -.39643a 20 29 60 jsr $396029 JSR FDC_Check_CMD_BSY ; Check I can send a command -.39643d 90 05 bcc $396444 BCC time_out ; If there was a time out, raise an error -.39643f 28 plp PLP -.396440 2b pld PLD -.396441 ab plb PLB -.396442 38 sec SEC -.396443 6b rtl RTL -.396444 time_out -.396444 e2 20 sep #$20 SEP #$20 ; set A short -.396446 a9 8c lda #$8c LDA #BIOS_ERR_TIMEOUT ; Return a time out error -.396448 8d 20 03 sta $0320 STA @w BIOS_STATUS -.39644b 28 plp PLP -.39644c 2b pld PLD -.39644d ab plb PLB -.39644e 18 clc CLC -.39644f 6b rtl RTL -.396450 FDC_Read_ID_Command -.396450 8b phb PHB -.396451 0b phd PHD -.396452 08 php PHP -.396453 48 pha PHA ; begin setdbr macro -.396454 08 php PHP -.396455 e2 20 sep #$20 SEP #$20 ; set A short -.396457 a9 00 lda #$00 LDA #0 -.396459 48 pha PHA -.39645a ab plb PLB -.39645b 28 plp PLP -.39645c 68 pla PLA ; end setdbr macro -.39645d 48 pha PHA ; begin setdp macro -.39645e 08 php PHP -.39645f c2 20 rep #$20 REP #$20 ; set A long -.396461 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.396464 5b tcd TCD -.396465 28 plp PLP -.396466 68 pla PLA ; end setdp macro -.396467 e2 20 sep #$20 SEP #$20 ; set A short -.396469 a9 0a lda #$0a LDA #FDC_CMD_READ_ID ; READID Command -.39646b 8d 00 05 sta $0500 STA FDC_PARAMETERS -.39646e a9 01 lda #$01 LDA #1 -.396470 8d 30 05 sta $0530 STA FDC_PARAM_NUM ; 4 parameter (the command) -.396473 9c 33 05 stz $0533 STZ FDC_EXPECT_DAT ; 0 data -.396476 a9 07 lda #$07 LDA #7 -.396478 8d 32 05 sta $0532 STA FDC_RESULT_NUM ; 7 results -.39647b 22 c8 60 39 jsl $3960c8 JSL FDC_COMMAND ; Issue the command -.39647f 90 27 bcc $3964a8 BCC pass_failure -.396481 ad 10 05 lda $0510 LDA FDC_RESULTS -.396484 85 06 sta $0306 STA FDC_ST0 ; Get ST0 -.396486 ad 11 05 lda $0511 LDA FDC_RESULTS+1 -.396489 85 07 sta $0307 STA FDC_ST1 ; Get ST1 -.39648b ad 12 05 lda $0512 LDA FDC_RESULTS+2 -.39648e 85 08 sta $0308 STA FDC_ST2 ; Get ST2 -.396490 ad 13 05 lda $0513 LDA FDC_RESULTS+3 -.396493 85 02 sta $0302 STA FDC_CYLINDER ; Get the cylinder -.396495 ad 14 05 lda $0514 LDA FDC_RESULTS+4 -.396498 85 01 sta $0301 STA FDC_HEAD ; Get the head -.39649a ad 15 05 lda $0515 LDA FDC_RESULTS+5 -.39649d 85 0a sta $030a STA FDC_PCN ; Get the sector -.39649f ad 16 05 lda $0516 LDA FDC_RESULTS+6 -.3964a2 85 04 sta $0304 STA FDC_SECTOR_SIZE ; Get the sector size code -.3964a4 28 plp PLP -.3964a5 2b pld PLD -.3964a6 ab plb PLB -.3964a7 6b rtl RTL -.3964a8 28 plp pass_failure PLP -.3964a9 2b pld PLD -.3964aa ab plb PLB -.3964ab 18 clc CLC +.395fd2 FDC_Check_RQM +.395fd2 0b phd PHD +.395fd3 08 php PHP +.395fd4 48 pha PHA ; begin setdp macro +.395fd5 08 php PHP +.395fd6 c2 20 rep #$20 REP #$20 ; set A long +.395fd8 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.395fdb 5b tcd TCD +.395fdc 28 plp PLP +.395fdd 68 pla PLA ; end setdp macro +.395fde e2 20 sep #$20 SEP #$20 ; set A short +.395fe0 a9 1e lda #$1e LDA #FDC_WAIT_TIME ; Set a time out for the loop +.395fe2 22 03 41 39 jsl $394103 JSL ISETTIMEOUT +.395fe6 a5 2c lda $032c loop LDA @b BIOS_FLAGS ; Check if there was a time out +.395fe8 30 12 bmi $395ffc BMI time_out ; If so: signal a time out +.395fea af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR +.395fee 89 80 bit #$80 BIT #FDC_MSR_RQM +.395ff0 f0 f4 beq $395fe6 BEQ loop +.395ff2 a9 00 lda #$00 LDA #0 ; Clear the time out +.395ff4 22 03 41 39 jsl $394103 JSL ISETTIMEOUT +.395ff8 28 plp PLP +.395ff9 2b pld PLD +.395ffa 38 sec SEC +.395ffb 60 rts RTS +.395ffc 28 plp time_out PLP +.395ffd 2b pld PLD +.395ffe 18 clc CLC +.395fff 60 rts RTS +.396000 FDC_Check_DRV0_BSY +.396000 0b phd PHD +.396001 08 php PHP +.396002 48 pha PHA ; begin setdp macro +.396003 08 php PHP +.396004 c2 20 rep #$20 REP #$20 ; set A long +.396006 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.396009 5b tcd TCD +.39600a 28 plp PLP +.39600b 68 pla PLA ; end setdp macro +.39600c e2 20 sep #$20 SEP #$20 ; set A short +.39600e a9 1e lda #$1e LDA #FDC_WAIT_TIME ; Set a time out for the loop +.396010 22 03 41 39 jsl $394103 JSL ISETTIMEOUT +.396014 a5 2c lda $032c loop LDA @b BIOS_FLAGS ; Check if there was a time out +.396016 30 12 bmi $39602a BMI time_out ; If so: signal a time out +.396018 af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR +.39601c 89 01 bit #$01 BIT #FDC_MSR_DRV0BSY +.39601e d0 f4 bne $396014 BNE loop +.396020 a9 00 lda #$00 LDA #0 ; Clear the time out +.396022 22 03 41 39 jsl $394103 JSL ISETTIMEOUT +.396026 28 plp PLP +.396027 2b pld PLD +.396028 38 sec SEC +.396029 60 rts RTS +.39602a 28 plp time_out PLP +.39602b 2b pld PLD +.39602c 18 clc CLC +.39602d 60 rts RTS +.39602e FDC_Check_CMD_BSY +.39602e 0b phd PHD +.39602f 08 php PHP +.396030 48 pha PHA ; begin setdp macro +.396031 08 php PHP +.396032 c2 20 rep #$20 REP #$20 ; set A long +.396034 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.396037 5b tcd TCD +.396038 28 plp PLP +.396039 68 pla PLA ; end setdp macro +.39603a e2 20 sep #$20 SEP #$20 ; set A short +.39603c a9 1e lda #$1e LDA #FDC_WAIT_TIME ; Set a time out for the loop +.39603e 22 03 41 39 jsl $394103 JSL ISETTIMEOUT +.396042 a5 2c lda $032c loop LDA @b BIOS_FLAGS ; Check if there was a time out +.396044 30 12 bmi $396058 BMI time_out ; If so: signal a time out +.396046 af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR +.39604a 89 10 bit #$10 BIT #FDC_MSR_CMDBSY +.39604c d0 f4 bne $396042 BNE loop +.39604e a9 00 lda #$00 LDA #0 ; Clear the time out +.396050 22 03 41 39 jsl $394103 JSL ISETTIMEOUT +.396054 28 plp PLP +.396055 2b pld PLD +.396056 38 sec SEC +.396057 60 rts RTS +.396058 28 plp time_out PLP +.396059 2b pld PLD +.39605a 18 clc CLC +.39605b 60 rts RTS +.39605c FDC_Can_Read_Data +.39605c 0b phd PHD +.39605d 08 php PHP +.39605e 48 pha PHA ; begin setdp macro +.39605f 08 php PHP +.396060 c2 20 rep #$20 REP #$20 ; set A long +.396062 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.396065 5b tcd TCD +.396066 28 plp PLP +.396067 68 pla PLA ; end setdp macro +.396068 e2 20 sep #$20 SEP #$20 ; set A short +.39606a a9 1e lda #$1e LDA #FDC_WAIT_TIME ; Set a time out for the loop +.39606c 22 03 41 39 jsl $394103 JSL ISETTIMEOUT +.396070 a5 2c lda $032c loop LDA @b BIOS_FLAGS ; Check if there was a time out +.396072 30 14 bmi $396088 BMI time_out ; If so: signal a time out +.396074 af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR +.396078 29 40 and #$40 AND #FDC_MSR_DIO +.39607a c9 40 cmp #$40 CMP #FDC_MSR_DIO +.39607c d0 f2 bne $396070 BNE loop +.39607e a9 00 lda #$00 LDA #0 ; Clear the time out +.396080 22 03 41 39 jsl $394103 JSL ISETTIMEOUT +.396084 28 plp PLP +.396085 2b pld PLD +.396086 38 sec SEC +.396087 60 rts RTS +.396088 28 plp time_out PLP +.396089 2b pld PLD +.39608a 18 clc CLC +.39608b 60 rts RTS +.39608c FDC_CAN_WRITE +.39608c 0b phd PHD +.39608d 08 php PHP +.39608e 48 pha PHA ; begin setdp macro +.39608f 08 php PHP +.396090 c2 20 rep #$20 REP #$20 ; set A long +.396092 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.396095 5b tcd TCD +.396096 28 plp PLP +.396097 68 pla PLA ; end setdp macro +.396098 e2 20 sep #$20 SEP #$20 ; set A short +.39609a a9 1e lda #$1e LDA #FDC_WAIT_TIME ; Set a time out for the loop +.39609c 22 03 41 39 jsl $394103 JSL ISETTIMEOUT +.3960a0 a5 2c lda $032c loop LDA @b BIOS_FLAGS ; Check if there was a time out +.3960a2 30 14 bmi $3960b8 BMI time_out ; If so: signal a time out +.3960a4 af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR +.3960a8 29 c0 and #$c0 AND #FDC_MSR_RQM | FDC_MSR_DIO +.3960aa c9 80 cmp #$80 CMP #FDC_MSR_RQM +.3960ac d0 f2 bne $3960a0 BNE loop +.3960ae a9 00 lda #$00 LDA #0 ; Clear the time out +.3960b0 22 03 41 39 jsl $394103 JSL ISETTIMEOUT +.3960b4 28 plp PLP +.3960b5 2b pld PLD +.3960b6 38 sec SEC +.3960b7 60 rts RTS +.3960b8 28 plp time_out PLP +.3960b9 2b pld PLD +.3960ba 18 clc CLC +.3960bb 60 rts RTS +.3960bc FDC_DELAY_10MS +.3960bc da phx PHX +.3960bd 08 php PHP +.3960be c2 10 rep #$10 REP #$10 ; set X long +.3960c0 a2 80 3e ldx #$3e80 LDX #16000 ; Wait for around 10ms +.3960c3 ea nop loop NOP ; Each iteration should take 9 cycles +.3960c4 ca dex DEX +.3960c5 e0 00 00 cpx #$0000 CPX #0 +.3960c8 d0 f9 bne $3960c3 BNE loop +.3960ca 28 plp PLP +.3960cb fa plx PLX +.3960cc 6b rtl RTL +.3960cd FDC_COMMAND +.3960cd da phx PHX +.3960ce 8b phb PHB +.3960cf 0b phd PHD +.3960d0 08 php PHP +.3960d1 48 pha PHA ; begin setdbr macro +.3960d2 08 php PHP +.3960d3 e2 20 sep #$20 SEP #$20 ; set A short +.3960d5 a9 00 lda #$00 LDA #0 +.3960d7 48 pha PHA +.3960d8 ab plb PLB +.3960d9 28 plp PLP +.3960da 68 pla PLA ; end setdbr macro +.3960db 48 pha PHA ; begin setdp macro +.3960dc 08 php PHP +.3960dd c2 20 rep #$20 REP #$20 ; set A long +.3960df a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.3960e2 5b tcd TCD +.3960e3 28 plp PLP +.3960e4 68 pla PLA ; end setdp macro +.3960e5 22 bc 60 39 jsl $3960bc JSL FDC_DELAY_10MS ; Wait around 10ms +.3960e9 e2 30 sep #$30 SEP #$30 ; set A&X short +.3960eb a2 00 ldx #$00 LDX #0 +.3960ed a9 00 lda #$00 LDA #0 +.3960ef 9d 10 05 sta $0510,x clr_results STA FDC_RESULTS,X ; Clear the result buffer +.3960f2 e8 inx INX +.3960f3 e0 10 cpx #$10 CPX #16 +.3960f5 d0 f8 bne $3960ef BNE clr_results +.3960f7 af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR ; Validate we can send a command +.3960fb 29 c0 and #$c0 AND #FDC_MSR_RQM | FDC_MSR_DIO +.3960fd c9 80 cmp #$80 CMP #FDC_MSR_RQM +.3960ff f0 04 beq $396105 BEQ start_send ; If so, start sending +.396101 22 1a 62 39 jsl $39621a fdc_reset JSL FDC_INIT ; Reset the FDC +.396105 start_send +.396105 e2 10 sep #$10 SEP #$10 ; set X short +.396107 a2 00 ldx #$00 LDX #0 +.396109 20 d2 5f jsr $395fd2 send_loop JSR FDC_Check_RQM ; Wait until we can write +.39610c b0 03 bcs $396111 BCS send_param +.39610e 82 5e 00 brl $39616f BRL time_out ; If there was a timeout, flag the time out +.396111 bd 00 05 lda $0500,x send_param LDA FDC_PARAMETERS,X ; Get the parameter/command byte to write +.396114 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA ; Send it +.396118 22 bc 60 39 jsl $3960bc JSL FDC_DELAY_10MS ; Wait around 10ms for things to settle +.39611c e8 inx INX ; Advance to the next byte +.39611d ec 30 05 cpx $0530 CPX FDC_PARAM_NUM +.396120 d0 e7 bne $396109 BNE send_loop ; Keep sending until we've sent them all +.396122 ad 33 05 lda $0533 LDA FDC_EXPECT_DAT ; Check the data expectation byte +.396125 d0 03 bne $39612a BNE chk_data_dir +.396127 82 80 00 brl $3961aa BRL result_phase ; If 0: we just want a result +.39612a 10 3c bpl $396168 chk_data_dir BPL rd_data ; If >0: we want to read data +.39612c wr_data +.39612c a5 0b lda $030b wr_data_rdy LDA FDC_STATUS ; Check that the motor is still spinning +.39612e 30 03 bmi $396133 BMI wr_chk_rqm +.396130 82 3c 00 brl $39616f BRL time_out ; If not, raise an error +.396133 af f4 13 af lda $af13f4 wr_chk_rqm LDA @l SIO_FDC_MSR ; Wait for ready to write +.396137 89 80 bit #$80 BIT #FDC_MSR_RQM +.396139 f0 f1 beq $39612c BEQ wr_data_rdy +.39613b 89 20 bit #$20 BIT #FDC_MSR_NONDMA ; Check if in execution mode +.39613d d0 03 bne $396142 BNE wr_data_phase ; If so: transfer the data +.39613f 82 68 00 brl $3961aa BRL result_phase ; If not: it's an error +.396142 wr_data_phase +.396142 c2 10 rep #$10 REP #$10 ; set X long +.396144 a0 00 00 ldy #$0000 LDY #0 +.396147 a5 0b lda $030b wr_data_loop LDA FDC_STATUS ; Check that the motor is still spinning +.396149 30 03 bmi $39614e BMI wr_chk_nondma +.39614b 82 21 00 brl $39616f BRL time_out ; If not, raise an error +.39614e af f4 13 af lda $af13f4 wr_chk_nondma LDA @l SIO_FDC_MSR ; Check to see if the FDC is in execution phase +.396152 89 20 bit #$20 BIT #FDC_MSR_NONDMA +.396154 f0 54 beq $3961aa BEQ result_phase ; If not: break out to result phase +.396156 89 80 bit #$80 BIT #FDC_MSR_RQM ; Check if we can read data +.396158 f0 ed beq $396147 BEQ wr_data_loop ; No: keep waiting +.39615a b7 26 lda [$0326],y LDA [BIOS_BUFF_PTR],Y ; Get the data byte +.39615c 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA ; And save it to the buffer +.396160 c8 iny INY ; Move to the next position +.396161 c0 00 02 cpy #$0200 CPY #512 ; TODO: set this from the parameters? +.396164 d0 e1 bne $396147 BNE wr_data_loop ; If not at the end, keep fetching +.396166 80 42 bra $3961aa BRA result_phase ; ready for the result phase +.396168 20 5c 60 jsr $39605c rd_data JSR FDC_Can_Read_Data +.39616b a5 0b lda $030b rd_data_rdy LDA FDC_STATUS ; Check that the motor is still spinning +.39616d 30 07 bmi $396176 BMI chk_rd_rdy ; If so, check to see if the data is ready +.39616f time_out +.39616f e2 20 sep #$20 SEP #$20 ; set A short +.396171 a9 8c lda #$8c LDA #BIOS_ERR_TIMEOUT ; Otherwise: throw a BIOS_ERR_TIMEOUT error +.396173 82 9c 00 brl $396212 BRL pass_error +.396176 af f4 13 af lda $af13f4 chk_rd_rdy LDA @l SIO_FDC_MSR ; Wait for data to be ready +.39617a 29 c0 and #$c0 AND #FDC_MSR_RQM | FDC_MSR_DIO +.39617c c9 c0 cmp #$c0 CMP #FDC_MSR_RQM | FDC_MSR_DIO +.39617e d0 eb bne $39616b BNE rd_data_rdy +.396180 af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR ; Check to see if the FDC is in execution phase +.396184 89 20 bit #$20 BIT #FDC_MSR_NONDMA +.396186 d0 03 bne $39618b BNE rd_data_phase ; If so: transfer the data +.396188 82 83 00 brl $39620e BRL error ; If not: it's an error +.39618b rd_data_phase +.39618b c2 10 rep #$10 REP #$10 ; set X long +.39618d a0 00 00 ldy #$0000 LDY #0 +.396190 a5 0b lda $030b rd_data_loop LDA FDC_STATUS ; Check that the motor is still spinning +.396192 10 db bpl $39616f BPL time_out ; If not: throw a timeout error +.396194 af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR ; Wait for the next byte to be ready +.396198 29 c0 and #$c0 AND #FDC_MSR_RQM | FDC_MSR_DIO +.39619a c9 c0 cmp #$c0 CMP #FDC_MSR_RQM | FDC_MSR_DIO +.39619c d0 f2 bne $396190 BNE rd_data_loop +.39619e af f5 13 af lda $af13f5 LDA @l SIO_FDC_DTA ; Get the data byte +.3961a2 97 26 sta [$0326],y STA [BIOS_BUFF_PTR],Y ; And save it to the buffer +.3961a4 c8 iny INY ; Move to the next position +.3961a5 c0 00 02 cpy #$0200 CPY #512 ; TODO: set this from the parameters? +.3961a8 d0 e6 bne $396190 BNE rd_data_loop ; If not at the end, keep fetching +.3961aa ad 32 05 lda $0532 result_phase LDA FDC_RESULT_NUM ; If no results are expected... +.3961ad f0 34 beq $3961e3 BEQ chk_busy ; Then we're done +.3961af e2 10 sep #$10 SEP #$10 ; set X short +.3961b1 a2 00 ldx #$00 LDX #0 +.3961b3 a9 1e lda #$1e LDA #FDC_WAIT_TIME ; Set the watchdog timer +.3961b5 22 03 41 39 jsl $394103 JSL ISETTIMEOUT +.3961b9 20 5c 60 jsr $39605c result_loop JSR FDC_Can_Read_Data ; Wait until we can read +.3961bc 90 b1 bcc $39616f BCC time_out ; If there was a time out, raise an error +.3961be af f5 13 af lda $af13f5 LDA @l SIO_FDC_DTA ; Yes: get the data +.3961c2 20 5c 60 jsr $39605c JSR FDC_Can_Read_Data ; Wait until we can read +.3961c5 90 a8 bcc $39616f BCC time_out ; If there was a time out, raise an error +.3961c7 af f5 13 af lda $af13f5 read_result LDA @l SIO_FDC_DTA ; Yes: get the data +.3961cb 9d 10 05 sta $0510,x STA FDC_RESULTS,X ; Save it to the result buffer +.3961ce 20 d2 5f jsr $395fd2 JSR FDC_Check_RQM +.3961d1 90 9c bcc $39616f BCC time_out ; If there was a time out, flag the error +.3961d3 af f4 13 af lda $af13f4 rd_chk_1 LDA @l SIO_FDC_MSR +.3961d7 29 50 and #$50 AND #FDC_MSR_DIO | FDC_MSR_CMDBSY +.3961d9 c9 50 cmp #$50 CMP #FDC_MSR_DIO | FDC_MSR_CMDBSY +.3961db d0 06 bne $3961e3 BNE chk_busy +.3961dd e8 inx INX ; Move to the next result positions +.3961de ec 32 05 cpx $0532 CPX FDC_RESULT_NUM +.3961e1 d0 e4 bne $3961c7 BNE read_result ; And keep looping until we've read all +.3961e3 chk_busy +.3961e3 c2 10 rep #$10 REP #$10 ; set X long +.3961e5 a2 0a 00 ldx #$000a LDX #10 ; Wait 10ms (I guess?) +.3961e8 22 19 16 39 jsl $391619 JSL ILOOP_MS +.3961ec af f4 13 af lda $af13f4 LDA @l SIO_FDC_MSR ; Check the command busy bit +.3961f0 89 10 bit #$10 BIT #FDC_MSR_CMDBSY +.3961f2 f0 12 beq $396206 BEQ done ; If not set: we're done +.3961f4 20 5c 60 jsr $39605c JSR FDC_Can_Read_Data ; Wait until we can read +.3961f7 b0 03 bcs $3961fc BCS get_result_byte +.3961f9 82 73 ff brl $39616f BRL time_out ; If there was a time out, flag the error +.3961fc af f5 13 af lda $af13f5 get_result_byte LDA @l SIO_FDC_DTA ; Read the data +.396200 9d 10 05 sta $0510,x STA FDC_RESULTS,X +.396203 e8 inx INX +.396204 80 dd bra $3961e3 BRA chk_busy ; And keep checking +.396206 done +.396206 64 20 stz $0320 STZ BIOS_STATUS +.396208 28 plp PLP +.396209 2b pld PLD +.39620a ab plb PLB +.39620b fa plx PLX +.39620c 38 sec SEC +.39620d 6b rtl RTL +.39620e error +.39620e e2 20 sep #$20 SEP #$20 ; set A short +.396210 a9 85 lda #$85 LDA #BIOS_ERR_CMD +.396212 85 20 sta $0320 pass_error STA BIOS_STATUS +.396214 28 plp PLP +.396215 2b pld PLD +.396216 ab plb PLB +.396217 fa plx PLX +.396218 18 clc CLC +.396219 6b rtl RTL +.39621a FDC_Init +.39621a 08 php PHP +.39621b c2 10 rep #$10 REP #$10 ; set X long +.39621d e2 20 sep #$20 SEP #$20 ; set A short +.39621f a9 00 lda #$00 LDA #0 +.396221 8f f2 13 af sta $af13f2 STA @l SIO_FDC_DOR +.396225 a2 e8 03 ldx #$03e8 LDX #1000 ; Wait +.396228 a0 00 00 ldy #$0000 LDY #0 +.39622b 22 26 16 39 jsl $391626 JSL IDELAY +.39622f a9 04 lda #$04 LDA #FDC_DOR_NRESET ; Reset the FDC +.396231 8f f2 13 af sta $af13f2 STA @l SIO_FDC_DOR +.396235 ea nop NOP +.396236 ea nop NOP +.396237 ea nop NOP +.396238 ea nop NOP +.396239 a9 00 lda #$00 LDA #$00 ; Make sure the Speed and Compensation has been set +.39623b 8f f4 13 af sta $af13f4 STA @l SIO_FDC_DSR +.39623f a9 00 lda #$00 LDA #$00 ; Precompensation set to 0 +.396241 8f f7 13 af sta $af13f7 STA @l SIO_FDC_CCR +.396245 a2 8f c5 ldx #$c58f LDX #<>FDC_SEEK_TIME +.396248 a0 20 00 ldy #$0020 LDY #`FDC_SEEK_TIME +.39624b 22 26 16 39 jsl $391626 JSL IDELAY +.39624f 22 2a 63 39 jsl $39632a JSL FDC_Sense_Int_Status +.396253 90 25 bcc $39627a BCC pass_failure +.396255 22 2a 63 39 jsl $39632a JSL FDC_Sense_Int_Status +.396259 90 1f bcc $39627a BCC pass_failure +.39625b 22 2a 63 39 jsl $39632a JSL FDC_Sense_Int_Status +.39625f 90 19 bcc $39627a BCC pass_failure +.396261 22 2a 63 39 jsl $39632a JSL FDC_Sense_Int_Status +.396265 90 13 bcc $39627a BCC pass_failure +.396267 22 ec 63 39 jsl $3963ec JSL FDC_Configure_Command +.39626b 90 0d bcc $39627a BCC pass_failure +.39626d 22 93 63 39 jsl $396393 JSL FDC_Specify_Command +.396271 90 07 bcc $39627a BCC pass_failure +.396273 22 96 62 39 jsl $396296 JSL FDC_Motor_On +.396277 28 plp PLP +.396278 38 sec SEC +.396279 6b rtl RTL +.39627a 28 plp pass_failure PLP +.39627b 18 clc CLC +.39627c 6b rtl RTL +.39627d FDC_MOTOR_NEEDED +.39627d 08 php PHP +.39627e c2 20 rep #$20 REP #$20 ; set A long +.396280 78 sei SEI ; Turn off interrupts +.396281 a9 84 03 lda #$0384 LDA #FDC_MOTOR_ON_TIME ; Reset the FDC timeout clock +.396284 8f 4e a0 38 sta $38a04e STA @l FDC_MOTOR_TIMER +.396288 e2 20 sep #$20 SEP #$20 ; set A short +.39628a af 4c 01 00 lda $00014c LDA @l INT_MASK_REG0 +.39628e 29 fe and #$fe AND #~FNX0_INT00_SOF ; Enable the SOF interrupt +.396290 8f 4c 01 00 sta $00014c STA @l INT_MASK_REG0 +.396294 28 plp PLP +.396295 6b rtl RTL +.396296 FDC_Motor_On +.396296 08 php PHP +.396297 22 7d 62 39 jsl $39627d JSL FDC_MOTOR_NEEDED ; Reset the spindle motor timeout clock +.39629b e2 20 sep #$20 SEP #$20 ; set A short +.39629d af f2 13 af lda $af13f2 LDA @l SIO_FDC_DOR ; Check to see if the motor is already on +.3962a1 89 10 bit #$10 BIT #FDC_DOR_MOT0 +.3962a3 d0 1f bne $3962c4 BNE done ; If so: skip +.3962a5 a9 14 lda #$14 LDA #FDC_DOR_MOT0 | FDC_DOR_NRESET +.3962a7 8f f2 13 af sta $af13f2 STA @l SIO_FDC_DOR +.3962ab 20 d2 5f jsr $395fd2 JSR FDC_Check_RQM ; Make sure we can leave knowing that everything set properly +.3962ae 90 17 bcc $3962c7 BCC time_out +.3962b0 a2 1e 8b ldx #$8b1e LDX #<>FDC_MOTOR_TIME ; Wait a suitable time for the motor to spin up +.3962b3 a0 41 00 ldy #$0041 LDY #`FDC_MOTOR_TIME +.3962b6 22 26 16 39 jsl $391626 JSL IDELAY +.3962ba af 0b 03 00 lda $00030b LDA @l FDC_STATUS +.3962be 09 80 ora #$80 ORA #$80 ; Flag that the motor should be on +.3962c0 8f 0b 03 00 sta $00030b STA @l FDC_STATUS +.3962c4 28 plp done PLP +.3962c5 38 sec SEC +.3962c6 6b rtl RTL +.3962c7 28 plp time_out PLP ; Return a timeout error +.3962c8 18 clc CLC +.3962c9 6b rtl RTL +.3962ca FDC_Motor_Off +.3962ca 08 php PHP +.3962cb e2 20 sep #$20 SEP #$20 ; set A short +.3962cd a9 04 lda #$04 LDA #FDC_DOR_NRESET +.3962cf 8f f2 13 af sta $af13f2 STA @L SIO_FDC_DOR +.3962d3 c2 20 rep #$20 REP #$20 ; set A long +.3962d5 78 sei SEI ; Turn off interrupts +.3962d6 a9 00 00 lda #$0000 LDA #0 ; Set FDC motor timeout counter to 0 to disable it +.3962d9 8f 4e a0 38 sta $38a04e STA @l FDC_MOTOR_TIMER +.3962dd e2 20 sep #$20 SEP #$20 ; set A short +.3962df af 4c 01 00 lda $00014c LDA @l INT_MASK_REG0 +.3962e3 09 01 ora #$01 ORA #FNX0_INT00_SOF ; Disable the SOF interrupt +.3962e5 8f 4c 01 00 sta $00014c STA @l INT_MASK_REG0 +.3962e9 af 0b 03 00 lda $00030b LDA @l FDC_STATUS +.3962ed 29 7f and #$7f AND #$7F ; Flag that the motor should be off +.3962ef 8f 0b 03 00 sta $00030b STA @l FDC_STATUS +.3962f3 28 plp PLP +.3962f4 6b rtl RTL +.3962f5 FDC_Recalibrate_Command +.3962f5 0b phd PHD +.3962f6 08 php PHP +.3962f7 48 pha PHA ; begin setdp macro +.3962f8 08 php PHP +.3962f9 c2 20 rep #$20 REP #$20 ; set A long +.3962fb a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.3962fe 5b tcd TCD +.3962ff 28 plp PLP +.396300 68 pla PLA ; end setdp macro +.396301 22 7d 62 39 jsl $39627d JSL FDC_MOTOR_NEEDED ; Reset the spindle motor timeout clock +.396305 e2 20 sep #$20 SEP #$20 ; set A short +.396307 a9 07 lda #$07 LDA #FDC_CMD_RECALIBRATE ; RECALIBRATE Command +.396309 8d 00 05 sta $0500 STA FDC_PARAMETERS +.39630c a5 00 lda $0300 LDA FDC_DRIVE +.39630e 8d 01 05 sta $0501 STA FDC_PARAMETERS+1 +.396311 a9 02 lda #$02 LDA #2 +.396313 8d 30 05 sta $0530 STA FDC_PARAM_NUM ; 2 parameters +.396316 9c 33 05 stz $0533 STZ FDC_EXPECT_DAT ; 0 data +.396319 9c 32 05 stz $0532 STZ FDC_RESULT_NUM ; 0 results +.39631c 22 cd 60 39 jsl $3960cd JSL FDC_COMMAND ; Issue the command +.396320 90 04 bcc $396326 BCC pass_failure ; If failure, pass the failure up +.396322 28 plp PLP +.396323 2b pld PLD +.396324 38 sec SEC +.396325 6b rtl RTL +.396326 28 plp pass_failure PLP +.396327 2b pld PLD +.396328 18 clc CLC +.396329 6b rtl RTL +.39632a FDC_Sense_Int_Status +.39632a 8b phb PHB +.39632b 0b phd PHD +.39632c 08 php PHP +.39632d 48 pha PHA ; begin setdbr macro +.39632e 08 php PHP +.39632f e2 20 sep #$20 SEP #$20 ; set A short +.396331 a9 00 lda #$00 LDA #0 +.396333 48 pha PHA +.396334 ab plb PLB +.396335 28 plp PLP +.396336 68 pla PLA ; end setdbr macro +.396337 48 pha PHA ; begin setdp macro +.396338 08 php PHP +.396339 c2 20 rep #$20 REP #$20 ; set A long +.39633b a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.39633e 5b tcd TCD +.39633f 28 plp PLP +.396340 68 pla PLA ; end setdp macro +.396341 c2 30 rep #$30 REP #$30 ; set A&X long +.396343 a2 0a 00 ldx #$000a LDX #10 ; Wait for 10ms +.396346 22 19 16 39 jsl $391619 JSL ILOOP_MS +.39634a e2 20 sep #$20 SEP #$20 ; set A short +.39634c 64 06 stz $0306 STZ FDC_ST0 ; Clear ST0 +.39634e a9 ff lda #$ff LDA #$FF +.396350 85 0a sta $030a STA FDC_PCN ; Set PCN to some obviously bad value +.396352 20 2e 60 jsr $39602e JSR FDC_Check_CMD_BSY ; Check I can send a command +.396355 90 30 bcc $396387 BCC time_out ; If there was a time out, raise an error +.396357 20 d2 5f jsr $395fd2 JSR FDC_Check_RQM ; Check if I can transfer data +.39635a 90 2b bcc $396387 BCC time_out ; If there was a time out, raise an error +.39635c a9 08 lda #$08 LDA #FDC_CMD_SENSE_INTERRUPT +.39635e 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA +.396362 20 5c 60 jsr $39605c JSR FDC_Can_Read_Data +.396365 90 20 bcc $396387 BCC time_out ; If there was a time out, raise an error +.396367 20 d2 5f jsr $395fd2 JSR FDC_Check_RQM ; Check if I can transfer data +.39636a 90 1b bcc $396387 BCC time_out ; If there was a time out, raise an error +.39636c af f5 13 af lda $af13f5 LDA @l SIO_FDC_DTA +.396370 85 06 sta $0306 STA FDC_ST0 ; --- ST0 --- +.396372 20 d2 5f jsr $395fd2 JSR FDC_Check_RQM ; Check if I can transfer data +.396375 90 10 bcc $396387 BCC time_out ; If there was a time out, raise an error +.396377 af f5 13 af lda $af13f5 LDA @l SIO_FDC_DTA +.39637b 85 0a sta $030a STA FDC_PCN ; --- Cylinder --- +.39637d e2 20 sep #$20 SEP #$20 ; set A short +.39637f 9c 20 03 stz $0320 STZ @w BIOS_STATUS +.396382 28 plp PLP +.396383 2b pld PLD +.396384 ab plb PLB +.396385 38 sec SEC +.396386 6b rtl RTL +.396387 time_out +.396387 e2 20 sep #$20 SEP #$20 ; set A short +.396389 a9 8c lda #$8c LDA #BIOS_ERR_TIMEOUT ; Return a time out error +.39638b 8d 20 03 sta $0320 STA @w BIOS_STATUS +.39638e 28 plp PLP +.39638f 2b pld PLD +.396390 ab plb PLB +.396391 18 clc CLC +.396392 6b rtl RTL +.396393 FDC_Specify_Command +.396393 8b phb PHB +.396394 0b phd PHD +.396395 08 php PHP +.396396 48 pha PHA ; begin setdbr macro +.396397 08 php PHP +.396398 e2 20 sep #$20 SEP #$20 ; set A short +.39639a a9 00 lda #$00 LDA #0 +.39639c 48 pha PHA +.39639d ab plb PLB +.39639e 28 plp PLP +.39639f 68 pla PLA ; end setdbr macro +.3963a0 48 pha PHA ; begin setdp macro +.3963a1 08 php PHP +.3963a2 c2 20 rep #$20 REP #$20 ; set A long +.3963a4 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.3963a7 5b tcd TCD +.3963a8 28 plp PLP +.3963a9 68 pla PLA ; end setdp macro +.3963aa c2 30 rep #$30 REP #$30 ; set A&X long +.3963ac a2 0a 00 ldx #$000a LDX #10 ; Wait for 10ms +.3963af 22 19 16 39 jsl $391619 JSL ILOOP_MS +.3963b3 e2 20 sep #$20 SEP #$20 ; set A short +.3963b5 20 2e 60 jsr $39602e JSR FDC_Check_CMD_BSY ; Check I can send a command +.3963b8 90 26 bcc $3963e0 BCC time_out ; If there was a time out, raise an error +.3963ba 20 d2 5f jsr $395fd2 JSR FDC_Check_RQM ; Check if I can transfer data +.3963bd 90 21 bcc $3963e0 BCC time_out ; If there was a time out, raise an error +.3963bf a9 03 lda #$03 LDA #FDC_CMD_SPECIFY ; Specify Command +.3963c1 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA +.3963c5 20 d2 5f jsr $395fd2 JSR FDC_Check_RQM ; Check if I can transfer data +.3963c8 90 16 bcc $3963e0 BCC time_out ; If there was a time out, raise an error +.3963ca a9 cf lda #$cf LDA #$CF +.3963cc 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA +.3963d0 20 d2 5f jsr $395fd2 JSR FDC_Check_RQM ; Check if I can transfer data +.3963d3 90 0b bcc $3963e0 BCC time_out ; If there was a time out, raise an error +.3963d5 a9 01 lda #$01 LDA #$01 ; 1 = Non-DMA +.3963d7 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA +.3963db 28 plp PLP +.3963dc 2b pld PLD +.3963dd ab plb PLB +.3963de 38 sec SEC +.3963df 6b rtl RTL +.3963e0 time_out +.3963e0 e2 20 sep #$20 SEP #$20 ; set A short +.3963e2 a9 8c lda #$8c LDA #BIOS_ERR_TIMEOUT ; Return a time out error +.3963e4 8d 20 03 sta $0320 STA @w BIOS_STATUS +.3963e7 28 plp PLP +.3963e8 2b pld PLD +.3963e9 ab plb PLB +.3963ea 18 clc CLC +.3963eb 6b rtl RTL +.3963ec FDC_Configure_Command +.3963ec 8b phb PHB +.3963ed 0b phd PHD +.3963ee 08 php PHP +.3963ef 48 pha PHA ; begin setdbr macro +.3963f0 08 php PHP +.3963f1 e2 20 sep #$20 SEP #$20 ; set A short +.3963f3 a9 00 lda #$00 LDA #0 +.3963f5 48 pha PHA +.3963f6 ab plb PLB +.3963f7 28 plp PLP +.3963f8 68 pla PLA ; end setdbr macro +.3963f9 48 pha PHA ; begin setdp macro +.3963fa 08 php PHP +.3963fb c2 20 rep #$20 REP #$20 ; set A long +.3963fd a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.396400 5b tcd TCD +.396401 28 plp PLP +.396402 68 pla PLA ; end setdp macro +.396403 c2 30 rep #$30 REP #$30 ; set A&X long +.396405 a2 0a 00 ldx #$000a LDX #10 ; Wait for 10ms +.396408 22 19 16 39 jsl $391619 JSL ILOOP_MS +.39640c e2 20 sep #$20 SEP #$20 ; set A short +.39640e 20 2e 60 jsr $39602e JSR FDC_Check_CMD_BSY ; Check I can send a command +.396411 90 36 bcc $396449 BCC time_out ; If there was a time out, raise an error +.396413 20 d2 5f jsr $395fd2 JSR FDC_Check_RQM ; Check if I can transfer data +.396416 90 31 bcc $396449 BCC time_out ; If there was a time out, raise an error +.396418 a9 13 lda #$13 LDA #FDC_CMD_CONFIGURE ; Specify Command +.39641a 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA +.39641e 20 d2 5f jsr $395fd2 JSR FDC_Check_RQM ; Check if I can transfer data +.396421 90 26 bcc $396449 BCC time_out ; If there was a time out, raise an error +.396423 a9 00 lda #$00 LDA #$00 +.396425 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA +.396429 20 d2 5f jsr $395fd2 JSR FDC_Check_RQM ; Check if I can transfer data +.39642c 90 1b bcc $396449 BCC time_out ; If there was a time out, raise an error +.39642e a9 44 lda #$44 LDA #$44 ; Implied Seek, FIFOTHR = 4 byte +.396430 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA +.396434 20 d2 5f jsr $395fd2 JSR FDC_Check_RQM ; Check if I can transfer data +.396437 90 10 bcc $396449 BCC time_out ; If there was a time out, raise an error +.396439 a9 00 lda #$00 LDA #$00 +.39643b 8f f5 13 af sta $af13f5 STA @l SIO_FDC_DTA +.39643f 20 2e 60 jsr $39602e JSR FDC_Check_CMD_BSY ; Check I can send a command +.396442 90 05 bcc $396449 BCC time_out ; If there was a time out, raise an error +.396444 28 plp PLP +.396445 2b pld PLD +.396446 ab plb PLB +.396447 38 sec SEC +.396448 6b rtl RTL +.396449 time_out +.396449 e2 20 sep #$20 SEP #$20 ; set A short +.39644b a9 8c lda #$8c LDA #BIOS_ERR_TIMEOUT ; Return a time out error +.39644d 8d 20 03 sta $0320 STA @w BIOS_STATUS +.396450 28 plp PLP +.396451 2b pld PLD +.396452 ab plb PLB +.396453 18 clc CLC +.396454 6b rtl RTL +.396455 FDC_Read_ID_Command +.396455 8b phb PHB +.396456 0b phd PHD +.396457 08 php PHP +.396458 48 pha PHA ; begin setdbr macro +.396459 08 php PHP +.39645a e2 20 sep #$20 SEP #$20 ; set A short +.39645c a9 00 lda #$00 LDA #0 +.39645e 48 pha PHA +.39645f ab plb PLB +.396460 28 plp PLP +.396461 68 pla PLA ; end setdbr macro +.396462 48 pha PHA ; begin setdp macro +.396463 08 php PHP +.396464 c2 20 rep #$20 REP #$20 ; set A long +.396466 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.396469 5b tcd TCD +.39646a 28 plp PLP +.39646b 68 pla PLA ; end setdp macro +.39646c e2 20 sep #$20 SEP #$20 ; set A short +.39646e a9 0a lda #$0a LDA #FDC_CMD_READ_ID ; READID Command +.396470 8d 00 05 sta $0500 STA FDC_PARAMETERS +.396473 a9 01 lda #$01 LDA #1 +.396475 8d 30 05 sta $0530 STA FDC_PARAM_NUM ; 4 parameter (the command) +.396478 9c 33 05 stz $0533 STZ FDC_EXPECT_DAT ; 0 data +.39647b a9 07 lda #$07 LDA #7 +.39647d 8d 32 05 sta $0532 STA FDC_RESULT_NUM ; 7 results +.396480 22 cd 60 39 jsl $3960cd JSL FDC_COMMAND ; Issue the command +.396484 90 27 bcc $3964ad BCC pass_failure +.396486 ad 10 05 lda $0510 LDA FDC_RESULTS +.396489 85 06 sta $0306 STA FDC_ST0 ; Get ST0 +.39648b ad 11 05 lda $0511 LDA FDC_RESULTS+1 +.39648e 85 07 sta $0307 STA FDC_ST1 ; Get ST1 +.396490 ad 12 05 lda $0512 LDA FDC_RESULTS+2 +.396493 85 08 sta $0308 STA FDC_ST2 ; Get ST2 +.396495 ad 13 05 lda $0513 LDA FDC_RESULTS+3 +.396498 85 02 sta $0302 STA FDC_CYLINDER ; Get the cylinder +.39649a ad 14 05 lda $0514 LDA FDC_RESULTS+4 +.39649d 85 01 sta $0301 STA FDC_HEAD ; Get the head +.39649f ad 15 05 lda $0515 LDA FDC_RESULTS+5 +.3964a2 85 0a sta $030a STA FDC_PCN ; Get the sector +.3964a4 ad 16 05 lda $0516 LDA FDC_RESULTS+6 +.3964a7 85 04 sta $0304 STA FDC_SECTOR_SIZE ; Get the sector size code +.3964a9 28 plp PLP +.3964aa 2b pld PLD +.3964ab ab plb PLB .3964ac 6b rtl RTL -.3964ad FDC_DumpReg_Command -.3964ad 0b phd PHD -.3964ae 08 php PHP -.3964af e2 20 sep #$20 SEP #$20 ; set A short -.3964b1 a9 0e lda #$0e LDA #FDC_CMD_DUMPREG ; DUMPREG Command -.3964b3 8d 00 05 sta $0500 STA FDC_PARAMETERS -.3964b6 a9 01 lda #$01 LDA #1 -.3964b8 8d 30 05 sta $0530 STA FDC_PARAM_NUM ; 4 parameter (the command) -.3964bb 9c 33 05 stz $0533 STZ FDC_EXPECT_DAT ; 0 data -.3964be a9 0a lda #$0a LDA #10 -.3964c0 8d 32 05 sta $0532 STA FDC_RESULT_NUM ; 10 results -.3964c3 22 c8 60 39 jsl $3960c8 JSL FDC_COMMAND ; Issue the command -.3964c7 90 03 bcc $3964cc BCC pass_failure -.3964c9 28 plp PLP -.3964ca 2b pld PLD -.3964cb 6b rtl RTL -.3964cc 28 plp pass_failure PLP -.3964cd 2b pld PLD -.3964ce 18 clc CLC -.3964cf 6b rtl RTL -.3964d0 FDC_Seek_Track -.3964d0 8b phb PHB -.3964d1 0b phd PHD -.3964d2 08 php PHP -.3964d3 48 pha PHA ; begin setdbr macro -.3964d4 08 php PHP -.3964d5 e2 20 sep #$20 SEP #$20 ; set A short -.3964d7 a9 00 lda #$00 LDA #0 -.3964d9 48 pha PHA -.3964da ab plb PLB -.3964db 28 plp PLP -.3964dc 68 pla PLA ; end setdbr macro -.3964dd 48 pha PHA ; begin setdp macro -.3964de 08 php PHP -.3964df c2 20 rep #$20 REP #$20 ; set A long -.3964e1 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.3964e4 5b tcd TCD -.3964e5 28 plp PLP -.3964e6 68 pla PLA ; end setdp macro -.3964e7 22 78 62 39 jsl $396278 JSL FDC_MOTOR_NEEDED ; Reset the spindle motor timeout clock -.3964eb e2 20 sep #$20 SEP #$20 ; set A short -.3964ed a9 0f lda #$0f LDA #FDC_CMD_SEEK ; Seek Command -.3964ef 8d 00 05 sta $0500 STA FDC_PARAMETERS -.3964f2 a5 01 lda $0301 LDA FDC_HEAD ; Get the head -.3964f4 29 01 and #$01 AND #$01 -.3964f6 0a asl a ASL A -.3964f7 0a asl a ASL A -.3964f8 05 00 ora $0300 ORA FDC_DRIVE ; And the drive number -.3964fa 8d 01 05 sta $0501 STA FDC_PARAMETERS+1 -.3964fd a5 02 lda $0302 LDA FDC_CYLINDER ; And the track -.3964ff 8d 02 05 sta $0502 STA FDC_PARAMETERS+2 -.396502 a9 03 lda #$03 LDA #3 -.396504 8d 30 05 sta $0530 STA FDC_PARAM_NUM ; 3 parameter (the command) -.396507 9c 33 05 stz $0533 STZ FDC_EXPECT_DAT ; 0 data -.39650a 9c 32 05 stz $0532 STZ FDC_RESULT_NUM ; 0 results -.39650d 22 c8 60 39 jsl $3960c8 JSL FDC_COMMAND ; Issue the command -.396511 90 05 bcc $396518 BCC pass_failure -.396513 28 plp PLP -.396514 2b pld PLD -.396515 ab plb PLB -.396516 38 sec SEC -.396517 6b rtl RTL -.396518 28 plp pass_failure PLP +.3964ad 28 plp pass_failure PLP +.3964ae 2b pld PLD +.3964af ab plb PLB +.3964b0 18 clc CLC +.3964b1 6b rtl RTL +.3964b2 FDC_DumpReg_Command +.3964b2 0b phd PHD +.3964b3 08 php PHP +.3964b4 e2 20 sep #$20 SEP #$20 ; set A short +.3964b6 a9 0e lda #$0e LDA #FDC_CMD_DUMPREG ; DUMPREG Command +.3964b8 8d 00 05 sta $0500 STA FDC_PARAMETERS +.3964bb a9 01 lda #$01 LDA #1 +.3964bd 8d 30 05 sta $0530 STA FDC_PARAM_NUM ; 4 parameter (the command) +.3964c0 9c 33 05 stz $0533 STZ FDC_EXPECT_DAT ; 0 data +.3964c3 a9 0a lda #$0a LDA #10 +.3964c5 8d 32 05 sta $0532 STA FDC_RESULT_NUM ; 10 results +.3964c8 22 cd 60 39 jsl $3960cd JSL FDC_COMMAND ; Issue the command +.3964cc 90 03 bcc $3964d1 BCC pass_failure +.3964ce 28 plp PLP +.3964cf 2b pld PLD +.3964d0 6b rtl RTL +.3964d1 28 plp pass_failure PLP +.3964d2 2b pld PLD +.3964d3 18 clc CLC +.3964d4 6b rtl RTL +.3964d5 FDC_Seek_Track +.3964d5 8b phb PHB +.3964d6 0b phd PHD +.3964d7 08 php PHP +.3964d8 48 pha PHA ; begin setdbr macro +.3964d9 08 php PHP +.3964da e2 20 sep #$20 SEP #$20 ; set A short +.3964dc a9 00 lda #$00 LDA #0 +.3964de 48 pha PHA +.3964df ab plb PLB +.3964e0 28 plp PLP +.3964e1 68 pla PLA ; end setdbr macro +.3964e2 48 pha PHA ; begin setdp macro +.3964e3 08 php PHP +.3964e4 c2 20 rep #$20 REP #$20 ; set A long +.3964e6 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.3964e9 5b tcd TCD +.3964ea 28 plp PLP +.3964eb 68 pla PLA ; end setdp macro +.3964ec 22 7d 62 39 jsl $39627d JSL FDC_MOTOR_NEEDED ; Reset the spindle motor timeout clock +.3964f0 e2 20 sep #$20 SEP #$20 ; set A short +.3964f2 a9 0f lda #$0f LDA #FDC_CMD_SEEK ; Seek Command +.3964f4 8d 00 05 sta $0500 STA FDC_PARAMETERS +.3964f7 a5 01 lda $0301 LDA FDC_HEAD ; Get the head +.3964f9 29 01 and #$01 AND #$01 +.3964fb 0a asl a ASL A +.3964fc 0a asl a ASL A +.3964fd 05 00 ora $0300 ORA FDC_DRIVE ; And the drive number +.3964ff 8d 01 05 sta $0501 STA FDC_PARAMETERS+1 +.396502 a5 02 lda $0302 LDA FDC_CYLINDER ; And the track +.396504 8d 02 05 sta $0502 STA FDC_PARAMETERS+2 +.396507 a9 03 lda #$03 LDA #3 +.396509 8d 30 05 sta $0530 STA FDC_PARAM_NUM ; 3 parameter (the command) +.39650c 9c 33 05 stz $0533 STZ FDC_EXPECT_DAT ; 0 data +.39650f 9c 32 05 stz $0532 STZ FDC_RESULT_NUM ; 0 results +.396512 22 cd 60 39 jsl $3960cd JSL FDC_COMMAND ; Issue the command +.396516 90 05 bcc $39651d BCC pass_failure +.396518 28 plp PLP .396519 2b pld PLD .39651a ab plb PLB -.39651b 18 clc CLC +.39651b 38 sec SEC .39651c 6b rtl RTL -.39651d FDC_Read_Sector -.39651d 8b phb PHB -.39651e 0b phd PHD -.39651f 08 php PHP -.396520 48 pha PHA ; begin setdbr macro -.396521 08 php PHP -.396522 e2 20 sep #$20 SEP #$20 ; set A short -.396524 a9 00 lda #$00 LDA #0 -.396526 48 pha PHA -.396527 ab plb PLB -.396528 28 plp PLP -.396529 68 pla PLA ; end setdbr macro -.39652a 48 pha PHA ; begin setdp macro -.39652b 08 php PHP -.39652c c2 20 rep #$20 REP #$20 ; set A long -.39652e a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.396531 5b tcd TCD -.396532 28 plp PLP -.396533 68 pla PLA ; end setdp macro -.396534 22 78 62 39 jsl $396278 JSL FDC_MOTOR_NEEDED ; Reset the spindle motor timeout clock -.396538 e2 20 sep #$20 SEP #$20 ; set A short -.39653a a9 06 lda #$06 LDA #FDC_CMD_READ_DATA ; The READ_DATA command -.39653c 09 40 ora #$40 ORA #FDC_CMD_MFM ; Turn on MFM mode -.39653e 8d 00 05 sta $0500 STA FDC_PARAMETERS -.396541 a5 01 lda $0301 LDA FDC_HEAD ; Get the head -.396543 29 01 and #$01 AND #$01 -.396545 0a asl a ASL A -.396546 0a asl a ASL A -.396547 05 00 ora $0300 ORA FDC_DRIVE ; And the drive number -.396549 8d 01 05 sta $0501 STA FDC_PARAMETERS+1 -.39654c a5 02 lda $0302 LDA FDC_CYLINDER ; Send the cylinder number -.39654e 8d 02 05 sta $0502 STA FDC_PARAMETERS+2 -.396551 a5 01 lda $0301 LDA FDC_HEAD ; Send the head number -.396553 8d 03 05 sta $0503 STA FDC_PARAMETERS+3 -.396556 a5 03 lda $0303 LDA FDC_SECTOR ; Send the sector number -.396558 8d 04 05 sta $0504 STA FDC_PARAMETERS+4 -.39655b a9 02 lda #$02 LDA #$02 ; --- N ---- Sector Size (2 = 512Bytes) -.39655d 8d 05 05 sta $0505 STA FDC_PARAMETERS+5 -.396560 a9 12 lda #$12 LDA #18 ; --- EOT ---- End of Track -.396562 8d 06 05 sta $0506 STA FDC_PARAMETERS+6 -.396565 a9 1b lda #$1b LDA #$1B ; --- GPL ---- End of Track -.396567 8d 07 05 sta $0507 STA FDC_PARAMETERS+7 -.39656a a9 ff lda #$ff LDA #$FF ; --- DTL ---- Special sector size -.39656c 8d 08 05 sta $0508 STA FDC_PARAMETERS+8 -.39656f a9 09 lda #$09 LDA #9 -.396571 8d 30 05 sta $0530 STA FDC_PARAM_NUM ; 9 parameter (the command) -.396574 a9 01 lda #$01 LDA #1 -.396576 8d 33 05 sta $0533 STA FDC_EXPECT_DAT ; Expect data -.396579 a9 07 lda #$07 LDA #7 -.39657b 8d 32 05 sta $0532 STA FDC_RESULT_NUM ; 7 results -.39657e 22 c8 60 39 jsl $3960c8 command JSL FDC_COMMAND ; Issue the command -.396582 08 php PHP -.396583 ad 10 05 lda $0510 get_results LDA FDC_RESULTS -.396586 85 06 sta $0306 STA FDC_ST0 ; --- ST0 ---- -.396588 ad 11 05 lda $0511 LDA FDC_RESULTS+1 -.39658b 85 07 sta $0307 STA FDC_ST1 ; --- ST1 ---- -.39658d ad 12 05 lda $0512 LDA FDC_RESULTS+2 -.396590 85 08 sta $0308 STA FDC_ST2 ; --- ST2 ---- -.396592 ad 13 05 lda $0513 LDA FDC_RESULTS+3 -.396595 85 02 sta $0302 STA FDC_CYLINDER ; -- C --- -.396597 ad 14 05 lda $0514 LDA FDC_RESULTS+4 -.39659a 85 01 sta $0301 STA FDC_HEAD ; --- H --- -.39659c ad 15 05 lda $0515 LDA FDC_RESULTS+5 -.39659f 85 0a sta $030a STA FDC_PCN ; --- R --- -.3965a1 ad 16 05 lda $0516 LDA FDC_RESULTS+6 -.3965a4 85 04 sta $0304 STA FDC_SECTOR_SIZE ; --- N --- -.3965a6 28 plp PLP -.3965a7 90 04 bcc $3965ad BCC pass_failure -.3965a9 28 plp done PLP -.3965aa 2b pld PLD -.3965ab ab plb PLB -.3965ac 6b rtl RTL -.3965ad 28 plp pass_failure PLP -.3965ae 2b pld PLD -.3965af ab plb PLB -.3965b0 18 clc CLC +.39651d 28 plp pass_failure PLP +.39651e 2b pld PLD +.39651f ab plb PLB +.396520 18 clc CLC +.396521 6b rtl RTL +.396522 FDC_Read_Sector +.396522 8b phb PHB +.396523 0b phd PHD +.396524 08 php PHP +.396525 48 pha PHA ; begin setdbr macro +.396526 08 php PHP +.396527 e2 20 sep #$20 SEP #$20 ; set A short +.396529 a9 00 lda #$00 LDA #0 +.39652b 48 pha PHA +.39652c ab plb PLB +.39652d 28 plp PLP +.39652e 68 pla PLA ; end setdbr macro +.39652f 48 pha PHA ; begin setdp macro +.396530 08 php PHP +.396531 c2 20 rep #$20 REP #$20 ; set A long +.396533 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.396536 5b tcd TCD +.396537 28 plp PLP +.396538 68 pla PLA ; end setdp macro +.396539 22 7d 62 39 jsl $39627d JSL FDC_MOTOR_NEEDED ; Reset the spindle motor timeout clock +.39653d e2 20 sep #$20 SEP #$20 ; set A short +.39653f a9 06 lda #$06 LDA #FDC_CMD_READ_DATA ; The READ_DATA command +.396541 09 40 ora #$40 ORA #FDC_CMD_MFM ; Turn on MFM mode +.396543 8d 00 05 sta $0500 STA FDC_PARAMETERS +.396546 a5 01 lda $0301 LDA FDC_HEAD ; Get the head +.396548 29 01 and #$01 AND #$01 +.39654a 0a asl a ASL A +.39654b 0a asl a ASL A +.39654c 05 00 ora $0300 ORA FDC_DRIVE ; And the drive number +.39654e 8d 01 05 sta $0501 STA FDC_PARAMETERS+1 +.396551 a5 02 lda $0302 LDA FDC_CYLINDER ; Send the cylinder number +.396553 8d 02 05 sta $0502 STA FDC_PARAMETERS+2 +.396556 a5 01 lda $0301 LDA FDC_HEAD ; Send the head number +.396558 8d 03 05 sta $0503 STA FDC_PARAMETERS+3 +.39655b a5 03 lda $0303 LDA FDC_SECTOR ; Send the sector number +.39655d 8d 04 05 sta $0504 STA FDC_PARAMETERS+4 +.396560 a9 02 lda #$02 LDA #$02 ; --- N ---- Sector Size (2 = 512Bytes) +.396562 8d 05 05 sta $0505 STA FDC_PARAMETERS+5 +.396565 a9 12 lda #$12 LDA #18 ; --- EOT ---- End of Track +.396567 8d 06 05 sta $0506 STA FDC_PARAMETERS+6 +.39656a a9 1b lda #$1b LDA #$1B ; --- GPL ---- End of Track +.39656c 8d 07 05 sta $0507 STA FDC_PARAMETERS+7 +.39656f a9 ff lda #$ff LDA #$FF ; --- DTL ---- Special sector size +.396571 8d 08 05 sta $0508 STA FDC_PARAMETERS+8 +.396574 a9 09 lda #$09 LDA #9 +.396576 8d 30 05 sta $0530 STA FDC_PARAM_NUM ; 9 parameter (the command) +.396579 a9 01 lda #$01 LDA #1 +.39657b 8d 33 05 sta $0533 STA FDC_EXPECT_DAT ; Expect data +.39657e a9 07 lda #$07 LDA #7 +.396580 8d 32 05 sta $0532 STA FDC_RESULT_NUM ; 7 results +.396583 22 cd 60 39 jsl $3960cd command JSL FDC_COMMAND ; Issue the command +.396587 08 php PHP +.396588 ad 10 05 lda $0510 get_results LDA FDC_RESULTS +.39658b 85 06 sta $0306 STA FDC_ST0 ; --- ST0 ---- +.39658d ad 11 05 lda $0511 LDA FDC_RESULTS+1 +.396590 85 07 sta $0307 STA FDC_ST1 ; --- ST1 ---- +.396592 ad 12 05 lda $0512 LDA FDC_RESULTS+2 +.396595 85 08 sta $0308 STA FDC_ST2 ; --- ST2 ---- +.396597 ad 13 05 lda $0513 LDA FDC_RESULTS+3 +.39659a 85 02 sta $0302 STA FDC_CYLINDER ; -- C --- +.39659c ad 14 05 lda $0514 LDA FDC_RESULTS+4 +.39659f 85 01 sta $0301 STA FDC_HEAD ; --- H --- +.3965a1 ad 15 05 lda $0515 LDA FDC_RESULTS+5 +.3965a4 85 0a sta $030a STA FDC_PCN ; --- R --- +.3965a6 ad 16 05 lda $0516 LDA FDC_RESULTS+6 +.3965a9 85 04 sta $0304 STA FDC_SECTOR_SIZE ; --- N --- +.3965ab 28 plp PLP +.3965ac 90 04 bcc $3965b2 BCC pass_failure +.3965ae 28 plp done PLP +.3965af 2b pld PLD +.3965b0 ab plb PLB .3965b1 6b rtl RTL -.3965b2 FDC_Write_Sector -.3965b2 8b phb PHB -.3965b3 0b phd PHD -.3965b4 08 php PHP -.3965b5 48 pha PHA ; begin setdbr macro -.3965b6 08 php PHP -.3965b7 e2 20 sep #$20 SEP #$20 ; set A short -.3965b9 a9 00 lda #$00 LDA #0 -.3965bb 48 pha PHA -.3965bc ab plb PLB -.3965bd 28 plp PLP -.3965be 68 pla PLA ; end setdbr macro -.3965bf 48 pha PHA ; begin setdp macro -.3965c0 08 php PHP -.3965c1 c2 20 rep #$20 REP #$20 ; set A long -.3965c3 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.3965c6 5b tcd TCD -.3965c7 28 plp PLP -.3965c8 68 pla PLA ; end setdp macro -.3965c9 e2 20 sep #$20 SEP #$20 ; set A short -.3965cb 22 78 62 39 jsl $396278 JSL FDC_MOTOR_NEEDED ; Reset the spindle motor timeout clock -.3965cf a9 05 lda #$05 LDA #FDC_CMD_WRITE_DATA ; The WRITE_DATA command -.3965d1 09 40 ora #$40 ORA #FDC_CMD_MFM ; Turn on MFM mode -.3965d3 8d 00 05 sta $0500 STA FDC_PARAMETERS -.3965d6 a5 01 lda $0301 LDA FDC_HEAD ; Get the head -.3965d8 29 01 and #$01 AND #$01 -.3965da 0a asl a ASL A -.3965db 0a asl a ASL A -.3965dc 05 00 ora $0300 ORA FDC_DRIVE ; And the drive number -.3965de 8d 01 05 sta $0501 STA FDC_PARAMETERS+1 -.3965e1 a5 02 lda $0302 LDA FDC_CYLINDER ; Send the cylinder number -.3965e3 8d 02 05 sta $0502 STA FDC_PARAMETERS+2 -.3965e6 a5 01 lda $0301 LDA FDC_HEAD ; Send the head number -.3965e8 8d 03 05 sta $0503 STA FDC_PARAMETERS+3 -.3965eb a5 03 lda $0303 LDA FDC_SECTOR ; Send the sector number -.3965ed 8d 04 05 sta $0504 STA FDC_PARAMETERS+4 -.3965f0 a9 02 lda #$02 LDA #$02 ; --- N ---- Sector Size (2 = 512Bytes) -.3965f2 8d 05 05 sta $0505 STA FDC_PARAMETERS+5 -.3965f5 a9 12 lda #$12 LDA #18 ; --- EOT ---- End of Track -.3965f7 8d 06 05 sta $0506 STA FDC_PARAMETERS+6 -.3965fa a9 1b lda #$1b LDA #$1B ; --- GPL ---- End of Track -.3965fc 8d 07 05 sta $0507 STA FDC_PARAMETERS+7 -.3965ff a9 ff lda #$ff LDA #$FF ; --- DTL ---- Special sector size -.396601 8d 08 05 sta $0508 STA FDC_PARAMETERS+8 -.396604 a9 09 lda #$09 LDA #9 -.396606 8d 30 05 sta $0530 STA FDC_PARAM_NUM ; 9 parameter (the command) -.396609 a9 ff lda #$ff LDA #$FF -.39660b 8d 33 05 sta $0533 STA FDC_EXPECT_DAT ; Expect to write data -.39660e a9 07 lda #$07 LDA #7 -.396610 8d 32 05 sta $0532 STA FDC_RESULT_NUM ; 7 results -.396613 22 c8 60 39 jsl $3960c8 command JSL FDC_COMMAND ; Issue the command -.396617 08 php PHP -.396618 ad 10 05 lda $0510 get_results LDA FDC_RESULTS -.39661b 85 06 sta $0306 STA FDC_ST0 ; --- ST0 --- -.39661d ad 11 05 lda $0511 LDA FDC_RESULTS+1 -.396620 85 07 sta $0307 STA FDC_ST1 ; --- ST1 --- -.396622 ad 12 05 lda $0512 LDA FDC_RESULTS+2 -.396625 85 08 sta $0308 STA FDC_ST2 ; --- ST2 --- -.396627 ad 13 05 lda $0513 LDA FDC_RESULTS+3 -.39662a 85 02 sta $0302 STA FDC_CYLINDER ; --- C --- -.39662c ad 14 05 lda $0514 LDA FDC_RESULTS+4 -.39662f 85 01 sta $0301 STA FDC_HEAD ; --- H --- -.396631 ad 15 05 lda $0515 LDA FDC_RESULTS+5 -.396634 85 0a sta $030a STA FDC_PCN ; --- R --- -.396636 ad 16 05 lda $0516 LDA FDC_RESULTS+6 -.396639 85 04 sta $0304 STA FDC_SECTOR_SIZE ; --- N --- -.39663b 28 plp check_status PLP -.39663c 90 04 bcc $396642 BCC pass_failure -.39663e 28 plp done PLP -.39663f 2b pld PLD -.396640 ab plb PLB -.396641 6b rtl RTL -.396642 28 plp pass_failure PLP -.396643 2b pld PLD -.396644 ab plb PLB -.396645 18 clc CLC +.3965b2 28 plp pass_failure PLP +.3965b3 2b pld PLD +.3965b4 ab plb PLB +.3965b5 18 clc CLC +.3965b6 6b rtl RTL +.3965b7 FDC_Write_Sector +.3965b7 8b phb PHB +.3965b8 0b phd PHD +.3965b9 08 php PHP +.3965ba 48 pha PHA ; begin setdbr macro +.3965bb 08 php PHP +.3965bc e2 20 sep #$20 SEP #$20 ; set A short +.3965be a9 00 lda #$00 LDA #0 +.3965c0 48 pha PHA +.3965c1 ab plb PLB +.3965c2 28 plp PLP +.3965c3 68 pla PLA ; end setdbr macro +.3965c4 48 pha PHA ; begin setdp macro +.3965c5 08 php PHP +.3965c6 c2 20 rep #$20 REP #$20 ; set A long +.3965c8 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.3965cb 5b tcd TCD +.3965cc 28 plp PLP +.3965cd 68 pla PLA ; end setdp macro +.3965ce e2 20 sep #$20 SEP #$20 ; set A short +.3965d0 22 7d 62 39 jsl $39627d JSL FDC_MOTOR_NEEDED ; Reset the spindle motor timeout clock +.3965d4 a9 05 lda #$05 LDA #FDC_CMD_WRITE_DATA ; The WRITE_DATA command +.3965d6 09 40 ora #$40 ORA #FDC_CMD_MFM ; Turn on MFM mode +.3965d8 8d 00 05 sta $0500 STA FDC_PARAMETERS +.3965db a5 01 lda $0301 LDA FDC_HEAD ; Get the head +.3965dd 29 01 and #$01 AND #$01 +.3965df 0a asl a ASL A +.3965e0 0a asl a ASL A +.3965e1 05 00 ora $0300 ORA FDC_DRIVE ; And the drive number +.3965e3 8d 01 05 sta $0501 STA FDC_PARAMETERS+1 +.3965e6 a5 02 lda $0302 LDA FDC_CYLINDER ; Send the cylinder number +.3965e8 8d 02 05 sta $0502 STA FDC_PARAMETERS+2 +.3965eb a5 01 lda $0301 LDA FDC_HEAD ; Send the head number +.3965ed 8d 03 05 sta $0503 STA FDC_PARAMETERS+3 +.3965f0 a5 03 lda $0303 LDA FDC_SECTOR ; Send the sector number +.3965f2 8d 04 05 sta $0504 STA FDC_PARAMETERS+4 +.3965f5 a9 02 lda #$02 LDA #$02 ; --- N ---- Sector Size (2 = 512Bytes) +.3965f7 8d 05 05 sta $0505 STA FDC_PARAMETERS+5 +.3965fa a9 12 lda #$12 LDA #18 ; --- EOT ---- End of Track +.3965fc 8d 06 05 sta $0506 STA FDC_PARAMETERS+6 +.3965ff a9 1b lda #$1b LDA #$1B ; --- GPL ---- End of Track +.396601 8d 07 05 sta $0507 STA FDC_PARAMETERS+7 +.396604 a9 ff lda #$ff LDA #$FF ; --- DTL ---- Special sector size +.396606 8d 08 05 sta $0508 STA FDC_PARAMETERS+8 +.396609 a9 09 lda #$09 LDA #9 +.39660b 8d 30 05 sta $0530 STA FDC_PARAM_NUM ; 9 parameter (the command) +.39660e a9 ff lda #$ff LDA #$FF +.396610 8d 33 05 sta $0533 STA FDC_EXPECT_DAT ; Expect to write data +.396613 a9 07 lda #$07 LDA #7 +.396615 8d 32 05 sta $0532 STA FDC_RESULT_NUM ; 7 results +.396618 22 cd 60 39 jsl $3960cd command JSL FDC_COMMAND ; Issue the command +.39661c 08 php PHP +.39661d ad 10 05 lda $0510 get_results LDA FDC_RESULTS +.396620 85 06 sta $0306 STA FDC_ST0 ; --- ST0 --- +.396622 ad 11 05 lda $0511 LDA FDC_RESULTS+1 +.396625 85 07 sta $0307 STA FDC_ST1 ; --- ST1 --- +.396627 ad 12 05 lda $0512 LDA FDC_RESULTS+2 +.39662a 85 08 sta $0308 STA FDC_ST2 ; --- ST2 --- +.39662c ad 13 05 lda $0513 LDA FDC_RESULTS+3 +.39662f 85 02 sta $0302 STA FDC_CYLINDER ; --- C --- +.396631 ad 14 05 lda $0514 LDA FDC_RESULTS+4 +.396634 85 01 sta $0301 STA FDC_HEAD ; --- H --- +.396636 ad 15 05 lda $0515 LDA FDC_RESULTS+5 +.396639 85 0a sta $030a STA FDC_PCN ; --- R --- +.39663b ad 16 05 lda $0516 LDA FDC_RESULTS+6 +.39663e 85 04 sta $0304 STA FDC_SECTOR_SIZE ; --- N --- +.396640 28 plp check_status PLP +.396641 90 04 bcc $396647 BCC pass_failure +.396643 28 plp done PLP +.396644 2b pld PLD +.396645 ab plb PLB .396646 6b rtl RTL -.396647 DIVIDE32 -.396647 da phx PHX -.396648 5a phy PHY -.396649 0b phd PHD -.39664a 08 php PHP -.39664b 48 pha PHA ; begin setdp macro -.39664c 08 php PHP -.39664d c2 20 rep #$20 REP #$20 ; set A long -.39664f a9 0c 03 lda #$030c LDA #DIVIDEND ; set DP to page 0 -.396652 5b tcd TCD -.396653 28 plp PLP -.396654 68 pla PLA ; end setdp macro -.396655 c2 30 rep #$30 REP #$30 ; set A&X long -.396657 64 08 stz $0314 STZ REMAINDER ; Initialize the remainder -.396659 64 0a stz $0316 STZ REMAINDER+2 -.39665b a2 20 00 ldx #$0020 LDX #32 ; Set the number of bits to process -.39665e 06 00 asl $030c loop ASL DIVIDEND -.396660 26 02 rol $030e ROL DIVIDEND+2 -.396662 26 08 rol $0314 ROL REMAINDER -.396664 26 0a rol $0316 ROL REMAINDER+2 -.396666 a5 08 lda $0314 LDA REMAINDER -.396668 38 sec SEC -.396669 e5 04 sbc $0310 SBC DIVISOR -.39666b a8 tay TAY -.39666c a5 0a lda $0316 LDA REMAINDER+2 -.39666e e5 06 sbc $0312 SBC DIVISOR+2 -.396670 90 06 bcc $396678 BCC skip -.396672 85 0a sta $0316 STA REMAINDER+2 -.396674 84 08 sty $0314 STY REMAINDER -.396676 e6 00 inc $030c INC DIVIDEND -.396678 ca dex skip DEX -.396679 d0 e3 bne $39665e BNE loop -.39667b 28 plp PLP -.39667c 2b pld PLD -.39667d 7a ply PLY -.39667e fa plx PLX -.39667f 60 rts RTS -.396680 LBA2CHS -.396680 8b phb PHB -.396681 0b phd PHD -.396682 08 php PHP -.396683 48 pha PHA ; begin setdbr macro -.396684 08 php PHP -.396685 e2 20 sep #$20 SEP #$20 ; set A short -.396687 a9 00 lda #$00 LDA #0 -.396689 48 pha PHA -.39668a ab plb PLB -.39668b 28 plp PLP -.39668c 68 pla PLA ; end setdbr macro -.39668d 48 pha PHA ; begin setdp macro -.39668e 08 php PHP -.39668f c2 20 rep #$20 REP #$20 ; set A long -.396691 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.396694 5b tcd TCD -.396695 28 plp PLP -.396696 68 pla PLA ; end setdp macro -.396697 c2 30 rep #$30 REP #$30 ; set A&X long -.396699 a5 22 lda $0322 LDA BIOS_LBA -.39669b 85 0c sta $030c STA DIVIDEND -.39669d a5 24 lda $0324 LDA BIOS_LBA+2 -.39669f 85 0e sta $030e STA DIVIDEND+2 -.3966a1 a9 24 00 lda #$0024 LDA #36 -.3966a4 85 10 sta $0310 STA DIVISOR -.3966a6 64 12 stz $0312 STZ DIVISOR+2 -.3966a8 20 47 66 jsr $396647 JSR DIVIDE32 -.3966ab e2 20 sep #$20 SEP #$20 ; set A short -.3966ad a5 0c lda $030c LDA DIVIDEND -.3966af 85 02 sta $0302 STA FDC_CYLINDER -.3966b1 c2 20 rep #$20 REP #$20 ; set A long -.3966b3 a5 14 lda $0314 LDA REMAINDER -.3966b5 85 0c sta $030c STA DIVIDEND -.3966b7 a5 16 lda $0316 LDA REMAINDER+2 -.3966b9 85 0e sta $030e STA DIVIDEND+2 -.3966bb a9 12 00 lda #$0012 LDA #18 -.3966be 85 10 sta $0310 STA DIVISOR -.3966c0 64 12 stz $0312 STZ DIVISOR+2 -.3966c2 20 47 66 jsr $396647 JSR DIVIDE32 -.3966c5 e2 20 sep #$20 SEP #$20 ; set A short -.3966c7 a5 0c lda $030c LDA DIVIDEND -.3966c9 29 01 and #$01 AND #$01 -.3966cb 85 01 sta $0301 STA FDC_HEAD -.3966cd a5 14 lda $0314 LDA REMAINDER -.3966cf 1a inc a INC A -.3966d0 85 03 sta $0303 STA FDC_SECTOR -.3966d2 28 plp PLP -.3966d3 2b pld PLD -.3966d4 ab plb PLB -.3966d5 6b rtl RTL -.3966d6 FDC_GETBLOCK -.3966d6 8b phb PHB -.3966d7 0b phd PHD -.3966d8 08 php PHP -.3966d9 48 pha PHA ; begin setdbr macro -.3966da 08 php PHP -.3966db e2 20 sep #$20 SEP #$20 ; set A short -.3966dd a9 00 lda #$00 LDA #0 -.3966df 48 pha PHA -.3966e0 ab plb PLB -.3966e1 28 plp PLP -.3966e2 68 pla PLA ; end setdbr macro -.3966e3 48 pha PHA ; begin setdp macro -.3966e4 08 php PHP -.3966e5 c2 20 rep #$20 REP #$20 ; set A long -.3966e7 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.3966ea 5b tcd TCD -.3966eb 28 plp PLP -.3966ec 68 pla PLA ; end setdp macro -.3966ed e2 20 sep #$20 SEP #$20 ; set A short -.3966ef a9 03 lda #$03 LDA #3 ; We can retry 3 times -.3966f1 8d 34 05 sta $0534 STA FDC_CMD_RETRY -.3966f4 c2 30 rep #$30 REP #$30 ; set A&X long -.3966f6 22 80 66 39 jsl $396680 JSL LBA2CHS ; Convert the LBA to CHS -.3966fa e2 20 sep #$20 SEP #$20 ; set A short -.3966fc a5 03 lda $0303 LDA FDC_SECTOR ; Just make sure the sector is ok -.3966fe f0 29 beq $396729 BEQ read_failure -.396700 try_read -.396700 c2 20 rep #$20 REP #$20 ; set A long -.396702 22 1d 65 39 jsl $39651d JSL FDC_Read_Sector ; Read the sector -.396706 90 14 bcc $39671c BCC retry -.396708 e2 20 sep #$20 SEP #$20 ; set A short -.39670a a5 06 lda $0306 LDA FDC_ST0 -.39670c 29 d0 and #$d0 AND #%11010000 ; Check the error bits -.39670e d0 19 bne $396729 BNE read_failure -.396710 ret_success -.396710 e2 20 sep #$20 SEP #$20 ; set A short -.396712 a9 00 lda #$00 LDA #0 -.396714 8d 20 03 sta $0320 STA @w BIOS_STATUS -.396717 28 plp PLP -.396718 2b pld PLD -.396719 ab plb PLB -.39671a 38 sec SEC -.39671b 6b rtl RTL -.39671c retry -.39671c e2 20 sep #$20 SEP #$20 ; set A short -.39671e ce 34 05 dec $0534 DEC FDC_CMD_RETRY ; Decrement the retry counter -.396721 30 13 bmi $396736 BMI pass_failure ; If it's gone negative, we should quit with an error -.396723 22 15 62 39 jsl $396215 JSL FDC_INIT ; Otherwise, reinitialize the FDC -.396727 80 d7 bra $396700 BRA try_read ; And try the read again -.396729 read_failure -.396729 e2 20 sep #$20 SEP #$20 ; set A short -.39672b a9 82 lda #$82 LDA #BIOS_ERR_READ -.39672d 80 04 bra $396733 BRA ret_failure -.39672f seek_failure -.39672f e2 20 sep #$20 SEP #$20 ; set A short -.396731 a9 84 lda #$84 LDA #BIOS_ERR_TRACK -.396733 8d 20 03 sta $0320 ret_failure STA @w BIOS_STATUS -.396736 28 plp pass_failure PLP -.396737 2b pld PLD -.396738 ab plb PLB -.396739 18 clc CLC -.39673a 6b rtl RTL -.39673b FDC_PUTBLOCK -.39673b 8b phb PHB -.39673c 0b phd PHD -.39673d 08 php PHP -.39673e 48 pha PHA ; begin setdbr macro -.39673f 08 php PHP -.396740 e2 20 sep #$20 SEP #$20 ; set A short -.396742 a9 00 lda #$00 LDA #0 -.396744 48 pha PHA -.396745 ab plb PLB -.396746 28 plp PLP -.396747 68 pla PLA ; end setdbr macro -.396748 48 pha PHA ; begin setdp macro -.396749 08 php PHP -.39674a c2 20 rep #$20 REP #$20 ; set A long -.39674c a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.39674f 5b tcd TCD -.396750 28 plp PLP -.396751 68 pla PLA ; end setdp macro -.396752 e2 20 sep #$20 SEP #$20 ; set A short -.396754 a9 03 lda #$03 LDA #3 ; Set the number of retries we're willing to do -.396756 8d 34 05 sta $0534 STA @w FDC_CMD_RETRY -.396759 c2 30 rep #$30 REP #$30 ; set A&X long -.39675b 22 80 66 39 jsl $396680 JSL LBA2CHS ; Convert the LBA to CHS -.39675f 22 b2 65 39 jsl $3965b2 retry JSL FDC_Write_Sector ; Write the sector -.396763 b0 03 bcs $396768 BCS chk_st0 -.396765 82 28 00 brl $396790 BRL attempt_retry -.396768 chk_st0 -.396768 e2 20 sep #$20 SEP #$20 ; set A short -.39676a a5 06 lda $0306 LDA FDC_ST0 -.39676c 29 d0 and #$d0 AND #%11010000 ; Check the error bits -.39676e d0 0c bne $39677c BNE write_failure -.396770 ret_success -.396770 e2 20 sep #$20 SEP #$20 ; set A short -.396772 a9 00 lda #$00 LDA #0 -.396774 8d 20 03 sta $0320 STA @w BIOS_STATUS -.396777 28 plp PLP -.396778 2b pld PLD -.396779 ab plb PLB -.39677a 38 sec SEC -.39677b 6b rtl RTL -.39677c write_failure -.39677c e2 20 sep #$20 SEP #$20 ; set A short -.39677e a5 07 lda $0307 LDA FDC_ST1 ; Check ST1 for write protect -.396780 89 02 bit #$02 BIT #FDC_ST1_NW -.396782 f0 04 beq $396788 BEQ generic_err -.396784 a9 86 lda #$86 LDA #BIOS_ERR_WRITEPROT ; Yes: return a write-protect error -.396786 80 17 bra $39679f BRA ret_failure -.396788 89 10 bit #$10 generic_err BIT #FDC_ST1_OR ; TODO: properly handle over/under run errors -.39678a d0 e4 bne $396770 BNE ret_success -.39678c 89 80 bit #$80 BIT #FDC_ST1_EN ; TODO: properly handle end-of-track -.39678e d0 e0 bne $396770 BNE ret_success -.396790 attempt_retry -.396790 e2 20 sep #$20 SEP #$20 ; set A short -.396792 ce 34 05 dec $0534 DEC @w FDC_CMD_RETRY ; Count down the retries -.396795 d0 c8 bne $39675f BNE retry ; And retry unless we have none left -.396797 a9 83 lda #$83 LDA #BIOS_ERR_WRITE ; Otherwise: return a generic write error -.396799 80 04 bra $39679f BRA ret_failure -.39679b seek_failure -.39679b e2 20 sep #$20 SEP #$20 ; set A short -.39679d a9 84 lda #$84 LDA #BIOS_ERR_TRACK -.39679f ret_failure -.39679f 8d 20 03 sta $0320 STA @w BIOS_STATUS -.3967a2 28 plp pass_failure PLP -.3967a3 2b pld PLD -.3967a4 ab plb PLB -.3967a5 18 clc CLC -.3967a6 6b rtl RTL -.3967a7 FDC_MOUNT -.3967a7 8b phb PHB -.3967a8 0b phd PHD -.3967a9 08 php PHP -.3967aa 48 pha PHA ; begin setdbr macro -.3967ab 08 php PHP -.3967ac e2 20 sep #$20 SEP #$20 ; set A short -.3967ae a9 00 lda #$00 LDA #0 -.3967b0 48 pha PHA -.3967b1 ab plb PLB -.3967b2 28 plp PLP -.3967b3 68 pla PLA ; end setdbr macro -.3967b4 48 pha PHA ; begin setdp macro -.3967b5 08 php PHP -.3967b6 c2 20 rep #$20 REP #$20 ; set A long -.3967b8 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.3967bb 5b tcd TCD -.3967bc 28 plp PLP -.3967bd 68 pla PLA ; end setdp macro -.3967be 22 15 62 39 jsl $396215 JSL FDC_INIT -.3967c2 e2 20 sep #$20 SEP #$20 ; set A short -.3967c4 c2 10 rep #$10 REP #$10 ; set X long -.3967c6 a9 00 lda #$00 LDA #0 -.3967c8 a2 00 00 ldx #$0000 LDX #0 -.3967cb 9f 00 a3 38 sta $38a300,x zero_loop STA DOS_SECTOR,X -.3967cf e8 inx INX -.3967d0 e0 00 02 cpx #$0200 CPX #512 -.3967d3 d0 f6 bne $3967cb BNE zero_loop -.3967d5 a9 00 lda #$00 LDA #0 ; We only support drive 0 -.3967d7 85 00 sta $0300 STA FDC_DRIVE -.3967d9 22 91 62 39 jsl $396291 JSL FDC_Motor_On ; Turn the motor on -.3967dd c2 30 rep #$30 REP #$30 ; set A&X long -.3967df a9 00 00 lda #$0000 LDA #0 ; We want sector 0 -.3967e2 85 22 sta $0322 STA BIOS_LBA -.3967e4 85 24 sta $0324 STA BIOS_LBA+2 -.3967e6 a9 00 a3 lda #$a300 LDA #<>DOS_SECTOR ; And load it into DOS_SECTOR -.3967e9 85 26 sta $0326 STA BIOS_BUFF_PTR -.3967eb a9 38 00 lda #$0038 LDA #`DOS_SECTOR -.3967ee 85 28 sta $0328 STA BIOS_BUFF_PTR+2 -.3967f0 22 d6 66 39 jsl $3966d6 JSL FDC_GETBLOCK ; Attempt to read the data -.3967f4 b0 03 bcs $3967f9 BCS parse_boot ; If ok: start parsing the boot record -.3967f6 82 d3 00 brl $3968cc BRL pass_failure ; Pass the error up the chain -.3967f9 parse_boot -.3967f9 e2 20 sep #$20 SEP #$20 ; set A short -.3967fb a9 00 lda #$00 LDA #PART_TYPE_FAT12 ; Set the file system to FAT12 -.3967fd 8f 01 a0 38 sta $38a001 STA @l FILE_SYSTEM -.396801 a9 00 lda #$00 LDA #0 ; There are no partitions on the disk -.396803 8f 02 a0 38 sta $38a002 STA @l PARTITION -.396807 e2 20 sep #$20 SEP #$20 ; set A short -.396809 af 0d a3 38 lda $38a30d LDA DOS_SECTOR+BPB_SECPERCLUS12_OFF ; Get the # of sectors per cluster (usually 1) -.39680d 8f 03 a0 38 sta $38a003 STA @l SECTORS_PER_CLUSTER -.396811 c2 20 rep #$20 REP #$20 ; set A long -.396813 a9 00 00 lda #$0000 LDA #0 ; First sector of the "partition" is 0 -.396816 8f 04 a0 38 sta $38a004 STA @l FIRSTSECTOR -.39681a 8f 06 a0 38 sta $38a006 STA @l FIRSTSECTOR+2 -.39681e af 16 a3 38 lda $38a316 LDA DOS_SECTOR+BPB_SECPERFAT12_OFF ; Get the number of sectors per FAT -.396822 8f 10 a0 38 sta $38a010 STA @l SEC_PER_FAT -.396826 a9 00 00 lda #$0000 LDA #0 -.396829 8f 12 a0 38 sta $38a012 STA @l SEC_PER_FAT+2 -.39682d a9 01 00 lda #$0001 LDA #1 ; FAT#1 begins at sector 1 -.396830 8f 14 a0 38 sta $38a014 STA @l FAT_BEGIN_LBA -.396834 18 clc CLC -.396835 6f 10 a0 38 adc $38a010 ADC @l SEC_PER_FAT -.396839 8f 18 a0 38 sta $38a018 STA @l FAT2_BEGIN_LBA ; FAT#2 begins SEC_PER_FAT sectors later -.39683d a9 00 00 lda #$0000 LDA #0 -.396840 8f 16 a0 38 sta $38a016 STA @l FAT_BEGIN_LBA+2 -.396844 8f 1a a0 38 sta $38a01a STA @L FAT2_BEGIN_LBA+2 -.396848 18 clc CLC ; Calculate the root directory's starting sector -.396849 af 18 a0 38 lda $38a018 LDA @l FAT2_BEGIN_LBA -.39684d 6f 10 a0 38 adc $38a010 ADC @l SEC_PER_FAT -.396851 8f 20 a0 38 sta $38a020 STA @l ROOT_DIR_FIRST_CLUSTER ; ROOT_DIR_FIRST_CLUSTER will be a sector LBA for FAT12! -.396855 a9 00 00 lda #$0000 LDA #0 -.396858 8f 22 a0 38 sta $38a022 STA @l ROOT_DIR_FIRST_CLUSTER+2 -.39685c af 11 a3 38 lda $38a311 LDA DOS_SECTOR+BPB_ROOT_MAX_ENTRY12_OFF ; Get the maximum number of directory entries for the root dir -.396860 8f 24 a0 38 sta $38a024 STA @l ROOT_DIR_MAX_ENTRY -.396864 4a lsr a LSR A ; 16 entries per sector -.396865 4a lsr a LSR A -.396866 4a lsr a LSR A -.396867 4a lsr a LSR A ; So now A is the number of sectors in the root directory -.396868 18 clc CLC -.396869 6f 20 a0 38 adc $38a020 ADC @L ROOT_DIR_FIRST_CLUSTER ; Add that to the first sector LBA for the root directory -.39686d 8f 1c a0 38 sta $38a01c STA @l CLUSTER_BEGIN_LBA ; And that is the LBA for the first cluster -.396871 a9 00 00 lda #$0000 LDA #0 -.396874 8f 1e a0 38 sta $38a01e STA @l CLUSTER_BEGIN_LBA+2 -.396878 af 13 a3 38 lda $38a313 LDA DOS_SECTOR+BPB_TOTAL_SECTORS ; Set the sector limit -.39687c 8f 08 a0 38 sta $38a008 STA @l SECTORCOUNT -.396880 a9 00 00 lda #$0000 LDA #0 -.396883 8f 0a a0 38 sta $38a00a STA @l SECTORCOUNT+2 -.396887 af 0e a3 38 lda $38a30e LDA DOS_SECTOR+BPB_RSRVCLUS_OFF ; Get the number of reserved clusters -.39688b 8f 0c a0 38 sta $38a00c STA @l NUM_RSRV_SEC -.39688f a9 00 02 lda #$0200 LDA #DOS_SECTOR_SIZE ; Set the size of a FAT12 cluster -.396892 8f 0e a0 38 sta $38a00e STA @l CLUSTER_SIZE -.396896 e2 20 sep #$20 SEP #$20 ; set A short -.396898 af 26 a3 38 lda $38a326 LDA DOS_SECTOR+BPB_SIGNATUREB ; Is signature B $29? -.39689c c9 29 cmp #$29 CMP #BPB_EXTENDED_RECORD -.39689e 80 14 bra $3968b4 BRA no_volume_id ; No: there is no volume ID -.3968a0 is_extended -.3968a0 c2 20 rep #$20 REP #$20 ; set A long -.3968a2 af 27 a3 38 lda $38a327 LDA DOS_SECTOR+BPB_VOLUMEID ; Yes: set the volume ID -.3968a6 8f 26 a0 38 sta $38a026 STA @l VOLUME_ID -.3968aa af 29 a3 38 lda $38a329 LDA DOS_SECTOR+BPB_VOLUMEID+2 -.3968ae 8f 28 a0 38 sta $38a028 STA @l VOLUME_ID+2 -.3968b2 80 0d bra $3968c1 BRA ret_success -.3968b4 no_volume_id -.3968b4 c2 20 rep #$20 REP #$20 ; set A long -.3968b6 a9 00 00 lda #$0000 LDA #0 ; No: blank the Volume ID -.3968b9 8f 26 a0 38 sta $38a026 STA @l VOLUME_ID -.3968bd 8f 28 a0 38 sta $38a028 STA @L VOLUME_ID+2 -.3968c1 ret_success -.3968c1 e2 20 sep #$20 SEP #$20 ; set A short -.3968c3 a9 00 lda #$00 LDA #0 -.3968c5 85 20 sta $0320 STA BIOS_STATUS -.3968c7 28 plp PLP -.3968c8 2b pld PLD -.3968c9 ab plb PLB -.3968ca 38 sec SEC -.3968cb 6b rtl RTL -.3968cc 28 plp pass_failure PLP +.396647 28 plp pass_failure PLP +.396648 2b pld PLD +.396649 ab plb PLB +.39664a 18 clc CLC +.39664b 6b rtl RTL +.39664c DIVIDE32 +.39664c da phx PHX +.39664d 5a phy PHY +.39664e 0b phd PHD +.39664f 08 php PHP +.396650 48 pha PHA ; begin setdp macro +.396651 08 php PHP +.396652 c2 20 rep #$20 REP #$20 ; set A long +.396654 a9 0c 03 lda #$030c LDA #DIVIDEND ; set DP to page 0 +.396657 5b tcd TCD +.396658 28 plp PLP +.396659 68 pla PLA ; end setdp macro +.39665a c2 30 rep #$30 REP #$30 ; set A&X long +.39665c 64 08 stz $0314 STZ REMAINDER ; Initialize the remainder +.39665e 64 0a stz $0316 STZ REMAINDER+2 +.396660 a2 20 00 ldx #$0020 LDX #32 ; Set the number of bits to process +.396663 06 00 asl $030c loop ASL DIVIDEND +.396665 26 02 rol $030e ROL DIVIDEND+2 +.396667 26 08 rol $0314 ROL REMAINDER +.396669 26 0a rol $0316 ROL REMAINDER+2 +.39666b a5 08 lda $0314 LDA REMAINDER +.39666d 38 sec SEC +.39666e e5 04 sbc $0310 SBC DIVISOR +.396670 a8 tay TAY +.396671 a5 0a lda $0316 LDA REMAINDER+2 +.396673 e5 06 sbc $0312 SBC DIVISOR+2 +.396675 90 06 bcc $39667d BCC skip +.396677 85 0a sta $0316 STA REMAINDER+2 +.396679 84 08 sty $0314 STY REMAINDER +.39667b e6 00 inc $030c INC DIVIDEND +.39667d ca dex skip DEX +.39667e d0 e3 bne $396663 BNE loop +.396680 28 plp PLP +.396681 2b pld PLD +.396682 7a ply PLY +.396683 fa plx PLX +.396684 60 rts RTS +.396685 LBA2CHS +.396685 8b phb PHB +.396686 0b phd PHD +.396687 08 php PHP +.396688 48 pha PHA ; begin setdbr macro +.396689 08 php PHP +.39668a e2 20 sep #$20 SEP #$20 ; set A short +.39668c a9 00 lda #$00 LDA #0 +.39668e 48 pha PHA +.39668f ab plb PLB +.396690 28 plp PLP +.396691 68 pla PLA ; end setdbr macro +.396692 48 pha PHA ; begin setdp macro +.396693 08 php PHP +.396694 c2 20 rep #$20 REP #$20 ; set A long +.396696 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.396699 5b tcd TCD +.39669a 28 plp PLP +.39669b 68 pla PLA ; end setdp macro +.39669c c2 30 rep #$30 REP #$30 ; set A&X long +.39669e a5 22 lda $0322 LDA BIOS_LBA +.3966a0 85 0c sta $030c STA DIVIDEND +.3966a2 a5 24 lda $0324 LDA BIOS_LBA+2 +.3966a4 85 0e sta $030e STA DIVIDEND+2 +.3966a6 a9 24 00 lda #$0024 LDA #36 +.3966a9 85 10 sta $0310 STA DIVISOR +.3966ab 64 12 stz $0312 STZ DIVISOR+2 +.3966ad 20 4c 66 jsr $39664c JSR DIVIDE32 +.3966b0 e2 20 sep #$20 SEP #$20 ; set A short +.3966b2 a5 0c lda $030c LDA DIVIDEND +.3966b4 85 02 sta $0302 STA FDC_CYLINDER +.3966b6 c2 20 rep #$20 REP #$20 ; set A long +.3966b8 a5 14 lda $0314 LDA REMAINDER +.3966ba 85 0c sta $030c STA DIVIDEND +.3966bc a5 16 lda $0316 LDA REMAINDER+2 +.3966be 85 0e sta $030e STA DIVIDEND+2 +.3966c0 a9 12 00 lda #$0012 LDA #18 +.3966c3 85 10 sta $0310 STA DIVISOR +.3966c5 64 12 stz $0312 STZ DIVISOR+2 +.3966c7 20 4c 66 jsr $39664c JSR DIVIDE32 +.3966ca e2 20 sep #$20 SEP #$20 ; set A short +.3966cc a5 0c lda $030c LDA DIVIDEND +.3966ce 29 01 and #$01 AND #$01 +.3966d0 85 01 sta $0301 STA FDC_HEAD +.3966d2 a5 14 lda $0314 LDA REMAINDER +.3966d4 1a inc a INC A +.3966d5 85 03 sta $0303 STA FDC_SECTOR +.3966d7 28 plp PLP +.3966d8 2b pld PLD +.3966d9 ab plb PLB +.3966da 6b rtl RTL +.3966db FDC_GETBLOCK +.3966db 8b phb PHB +.3966dc 0b phd PHD +.3966dd 08 php PHP +.3966de 48 pha PHA ; begin setdbr macro +.3966df 08 php PHP +.3966e0 e2 20 sep #$20 SEP #$20 ; set A short +.3966e2 a9 00 lda #$00 LDA #0 +.3966e4 48 pha PHA +.3966e5 ab plb PLB +.3966e6 28 plp PLP +.3966e7 68 pla PLA ; end setdbr macro +.3966e8 48 pha PHA ; begin setdp macro +.3966e9 08 php PHP +.3966ea c2 20 rep #$20 REP #$20 ; set A long +.3966ec a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.3966ef 5b tcd TCD +.3966f0 28 plp PLP +.3966f1 68 pla PLA ; end setdp macro +.3966f2 e2 20 sep #$20 SEP #$20 ; set A short +.3966f4 a9 03 lda #$03 LDA #3 ; We can retry 3 times +.3966f6 8d 34 05 sta $0534 STA FDC_CMD_RETRY +.3966f9 c2 30 rep #$30 REP #$30 ; set A&X long +.3966fb 22 85 66 39 jsl $396685 JSL LBA2CHS ; Convert the LBA to CHS +.3966ff e2 20 sep #$20 SEP #$20 ; set A short +.396701 a5 03 lda $0303 LDA FDC_SECTOR ; Just make sure the sector is ok +.396703 f0 29 beq $39672e BEQ read_failure +.396705 try_read +.396705 c2 20 rep #$20 REP #$20 ; set A long +.396707 22 22 65 39 jsl $396522 JSL FDC_Read_Sector ; Read the sector +.39670b 90 14 bcc $396721 BCC retry +.39670d e2 20 sep #$20 SEP #$20 ; set A short +.39670f a5 06 lda $0306 LDA FDC_ST0 +.396711 29 d0 and #$d0 AND #%11010000 ; Check the error bits +.396713 d0 19 bne $39672e BNE read_failure +.396715 ret_success +.396715 e2 20 sep #$20 SEP #$20 ; set A short +.396717 a9 00 lda #$00 LDA #0 +.396719 8d 20 03 sta $0320 STA @w BIOS_STATUS +.39671c 28 plp PLP +.39671d 2b pld PLD +.39671e ab plb PLB +.39671f 38 sec SEC +.396720 6b rtl RTL +.396721 retry +.396721 e2 20 sep #$20 SEP #$20 ; set A short +.396723 ce 34 05 dec $0534 DEC FDC_CMD_RETRY ; Decrement the retry counter +.396726 30 13 bmi $39673b BMI pass_failure ; If it's gone negative, we should quit with an error +.396728 22 1a 62 39 jsl $39621a JSL FDC_INIT ; Otherwise, reinitialize the FDC +.39672c 80 d7 bra $396705 BRA try_read ; And try the read again +.39672e read_failure +.39672e e2 20 sep #$20 SEP #$20 ; set A short +.396730 a9 82 lda #$82 LDA #BIOS_ERR_READ +.396732 80 04 bra $396738 BRA ret_failure +.396734 seek_failure +.396734 e2 20 sep #$20 SEP #$20 ; set A short +.396736 a9 84 lda #$84 LDA #BIOS_ERR_TRACK +.396738 8d 20 03 sta $0320 ret_failure STA @w BIOS_STATUS +.39673b 28 plp pass_failure PLP +.39673c 2b pld PLD +.39673d ab plb PLB +.39673e 18 clc CLC +.39673f 6b rtl RTL +.396740 FDC_PUTBLOCK +.396740 8b phb PHB +.396741 0b phd PHD +.396742 08 php PHP +.396743 48 pha PHA ; begin setdbr macro +.396744 08 php PHP +.396745 e2 20 sep #$20 SEP #$20 ; set A short +.396747 a9 00 lda #$00 LDA #0 +.396749 48 pha PHA +.39674a ab plb PLB +.39674b 28 plp PLP +.39674c 68 pla PLA ; end setdbr macro +.39674d 48 pha PHA ; begin setdp macro +.39674e 08 php PHP +.39674f c2 20 rep #$20 REP #$20 ; set A long +.396751 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.396754 5b tcd TCD +.396755 28 plp PLP +.396756 68 pla PLA ; end setdp macro +.396757 e2 20 sep #$20 SEP #$20 ; set A short +.396759 a9 03 lda #$03 LDA #3 ; Set the number of retries we're willing to do +.39675b 8d 34 05 sta $0534 STA @w FDC_CMD_RETRY +.39675e c2 30 rep #$30 REP #$30 ; set A&X long +.396760 22 85 66 39 jsl $396685 JSL LBA2CHS ; Convert the LBA to CHS +.396764 22 b7 65 39 jsl $3965b7 retry JSL FDC_Write_Sector ; Write the sector +.396768 b0 03 bcs $39676d BCS chk_st0 +.39676a 82 28 00 brl $396795 BRL attempt_retry +.39676d chk_st0 +.39676d e2 20 sep #$20 SEP #$20 ; set A short +.39676f a5 06 lda $0306 LDA FDC_ST0 +.396771 29 d0 and #$d0 AND #%11010000 ; Check the error bits +.396773 d0 0c bne $396781 BNE write_failure +.396775 ret_success +.396775 e2 20 sep #$20 SEP #$20 ; set A short +.396777 a9 00 lda #$00 LDA #0 +.396779 8d 20 03 sta $0320 STA @w BIOS_STATUS +.39677c 28 plp PLP +.39677d 2b pld PLD +.39677e ab plb PLB +.39677f 38 sec SEC +.396780 6b rtl RTL +.396781 write_failure +.396781 e2 20 sep #$20 SEP #$20 ; set A short +.396783 a5 07 lda $0307 LDA FDC_ST1 ; Check ST1 for write protect +.396785 89 02 bit #$02 BIT #FDC_ST1_NW +.396787 f0 04 beq $39678d BEQ generic_err +.396789 a9 86 lda #$86 LDA #BIOS_ERR_WRITEPROT ; Yes: return a write-protect error +.39678b 80 17 bra $3967a4 BRA ret_failure +.39678d 89 10 bit #$10 generic_err BIT #FDC_ST1_OR ; TODO: properly handle over/under run errors +.39678f d0 e4 bne $396775 BNE ret_success +.396791 89 80 bit #$80 BIT #FDC_ST1_EN ; TODO: properly handle end-of-track +.396793 d0 e0 bne $396775 BNE ret_success +.396795 attempt_retry +.396795 e2 20 sep #$20 SEP #$20 ; set A short +.396797 ce 34 05 dec $0534 DEC @w FDC_CMD_RETRY ; Count down the retries +.39679a d0 c8 bne $396764 BNE retry ; And retry unless we have none left +.39679c a9 83 lda #$83 LDA #BIOS_ERR_WRITE ; Otherwise: return a generic write error +.39679e 80 04 bra $3967a4 BRA ret_failure +.3967a0 seek_failure +.3967a0 e2 20 sep #$20 SEP #$20 ; set A short +.3967a2 a9 84 lda #$84 LDA #BIOS_ERR_TRACK +.3967a4 ret_failure +.3967a4 8d 20 03 sta $0320 STA @w BIOS_STATUS +.3967a7 28 plp pass_failure PLP +.3967a8 2b pld PLD +.3967a9 ab plb PLB +.3967aa 18 clc CLC +.3967ab 6b rtl RTL +.3967ac FDC_MOUNT +.3967ac 8b phb PHB +.3967ad 0b phd PHD +.3967ae 08 php PHP +.3967af 48 pha PHA ; begin setdbr macro +.3967b0 08 php PHP +.3967b1 e2 20 sep #$20 SEP #$20 ; set A short +.3967b3 a9 00 lda #$00 LDA #0 +.3967b5 48 pha PHA +.3967b6 ab plb PLB +.3967b7 28 plp PLP +.3967b8 68 pla PLA ; end setdbr macro +.3967b9 48 pha PHA ; begin setdp macro +.3967ba 08 php PHP +.3967bb c2 20 rep #$20 REP #$20 ; set A long +.3967bd a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.3967c0 5b tcd TCD +.3967c1 28 plp PLP +.3967c2 68 pla PLA ; end setdp macro +.3967c3 22 1a 62 39 jsl $39621a JSL FDC_INIT +.3967c7 e2 20 sep #$20 SEP #$20 ; set A short +.3967c9 c2 10 rep #$10 REP #$10 ; set X long +.3967cb a9 00 lda #$00 LDA #0 +.3967cd a2 00 00 ldx #$0000 LDX #0 +.3967d0 9f 00 a3 38 sta $38a300,x zero_loop STA DOS_SECTOR,X +.3967d4 e8 inx INX +.3967d5 e0 00 02 cpx #$0200 CPX #512 +.3967d8 d0 f6 bne $3967d0 BNE zero_loop +.3967da a9 00 lda #$00 LDA #0 ; We only support drive 0 +.3967dc 85 00 sta $0300 STA FDC_DRIVE +.3967de 22 96 62 39 jsl $396296 JSL FDC_Motor_On ; Turn the motor on +.3967e2 c2 30 rep #$30 REP #$30 ; set A&X long +.3967e4 a9 00 00 lda #$0000 LDA #0 ; We want sector 0 +.3967e7 85 22 sta $0322 STA BIOS_LBA +.3967e9 85 24 sta $0324 STA BIOS_LBA+2 +.3967eb a9 00 a3 lda #$a300 LDA #<>DOS_SECTOR ; And load it into DOS_SECTOR +.3967ee 85 26 sta $0326 STA BIOS_BUFF_PTR +.3967f0 a9 38 00 lda #$0038 LDA #`DOS_SECTOR +.3967f3 85 28 sta $0328 STA BIOS_BUFF_PTR+2 +.3967f5 22 db 66 39 jsl $3966db JSL FDC_GETBLOCK ; Attempt to read the data +.3967f9 b0 03 bcs $3967fe BCS parse_boot ; If ok: start parsing the boot record +.3967fb 82 d3 00 brl $3968d1 BRL pass_failure ; Pass the error up the chain +.3967fe parse_boot +.3967fe e2 20 sep #$20 SEP #$20 ; set A short +.396800 a9 00 lda #$00 LDA #PART_TYPE_FAT12 ; Set the file system to FAT12 +.396802 8f 01 a0 38 sta $38a001 STA @l FILE_SYSTEM +.396806 a9 00 lda #$00 LDA #0 ; There are no partitions on the disk +.396808 8f 02 a0 38 sta $38a002 STA @l PARTITION +.39680c e2 20 sep #$20 SEP #$20 ; set A short +.39680e af 0d a3 38 lda $38a30d LDA DOS_SECTOR+BPB_SECPERCLUS12_OFF ; Get the # of sectors per cluster (usually 1) +.396812 8f 03 a0 38 sta $38a003 STA @l SECTORS_PER_CLUSTER +.396816 c2 20 rep #$20 REP #$20 ; set A long +.396818 a9 00 00 lda #$0000 LDA #0 ; First sector of the "partition" is 0 +.39681b 8f 04 a0 38 sta $38a004 STA @l FIRSTSECTOR +.39681f 8f 06 a0 38 sta $38a006 STA @l FIRSTSECTOR+2 +.396823 af 16 a3 38 lda $38a316 LDA DOS_SECTOR+BPB_SECPERFAT12_OFF ; Get the number of sectors per FAT +.396827 8f 10 a0 38 sta $38a010 STA @l SEC_PER_FAT +.39682b a9 00 00 lda #$0000 LDA #0 +.39682e 8f 12 a0 38 sta $38a012 STA @l SEC_PER_FAT+2 +.396832 a9 01 00 lda #$0001 LDA #1 ; FAT#1 begins at sector 1 +.396835 8f 14 a0 38 sta $38a014 STA @l FAT_BEGIN_LBA +.396839 18 clc CLC +.39683a 6f 10 a0 38 adc $38a010 ADC @l SEC_PER_FAT +.39683e 8f 18 a0 38 sta $38a018 STA @l FAT2_BEGIN_LBA ; FAT#2 begins SEC_PER_FAT sectors later +.396842 a9 00 00 lda #$0000 LDA #0 +.396845 8f 16 a0 38 sta $38a016 STA @l FAT_BEGIN_LBA+2 +.396849 8f 1a a0 38 sta $38a01a STA @L FAT2_BEGIN_LBA+2 +.39684d 18 clc CLC ; Calculate the root directory's starting sector +.39684e af 18 a0 38 lda $38a018 LDA @l FAT2_BEGIN_LBA +.396852 6f 10 a0 38 adc $38a010 ADC @l SEC_PER_FAT +.396856 8f 20 a0 38 sta $38a020 STA @l ROOT_DIR_FIRST_CLUSTER ; ROOT_DIR_FIRST_CLUSTER will be a sector LBA for FAT12! +.39685a a9 00 00 lda #$0000 LDA #0 +.39685d 8f 22 a0 38 sta $38a022 STA @l ROOT_DIR_FIRST_CLUSTER+2 +.396861 af 11 a3 38 lda $38a311 LDA DOS_SECTOR+BPB_ROOT_MAX_ENTRY12_OFF ; Get the maximum number of directory entries for the root dir +.396865 8f 24 a0 38 sta $38a024 STA @l ROOT_DIR_MAX_ENTRY +.396869 4a lsr a LSR A ; 16 entries per sector +.39686a 4a lsr a LSR A +.39686b 4a lsr a LSR A +.39686c 4a lsr a LSR A ; So now A is the number of sectors in the root directory +.39686d 18 clc CLC +.39686e 6f 20 a0 38 adc $38a020 ADC @L ROOT_DIR_FIRST_CLUSTER ; Add that to the first sector LBA for the root directory +.396872 8f 1c a0 38 sta $38a01c STA @l CLUSTER_BEGIN_LBA ; And that is the LBA for the first cluster +.396876 a9 00 00 lda #$0000 LDA #0 +.396879 8f 1e a0 38 sta $38a01e STA @l CLUSTER_BEGIN_LBA+2 +.39687d af 13 a3 38 lda $38a313 LDA DOS_SECTOR+BPB_TOTAL_SECTORS ; Set the sector limit +.396881 8f 08 a0 38 sta $38a008 STA @l SECTORCOUNT +.396885 a9 00 00 lda #$0000 LDA #0 +.396888 8f 0a a0 38 sta $38a00a STA @l SECTORCOUNT+2 +.39688c af 0e a3 38 lda $38a30e LDA DOS_SECTOR+BPB_RSRVCLUS_OFF ; Get the number of reserved clusters +.396890 8f 0c a0 38 sta $38a00c STA @l NUM_RSRV_SEC +.396894 a9 00 02 lda #$0200 LDA #DOS_SECTOR_SIZE ; Set the size of a FAT12 cluster +.396897 8f 0e a0 38 sta $38a00e STA @l CLUSTER_SIZE +.39689b e2 20 sep #$20 SEP #$20 ; set A short +.39689d af 26 a3 38 lda $38a326 LDA DOS_SECTOR+BPB_SIGNATUREB ; Is signature B $29? +.3968a1 c9 29 cmp #$29 CMP #BPB_EXTENDED_RECORD +.3968a3 80 14 bra $3968b9 BRA no_volume_id ; No: there is no volume ID +.3968a5 is_extended +.3968a5 c2 20 rep #$20 REP #$20 ; set A long +.3968a7 af 27 a3 38 lda $38a327 LDA DOS_SECTOR+BPB_VOLUMEID ; Yes: set the volume ID +.3968ab 8f 26 a0 38 sta $38a026 STA @l VOLUME_ID +.3968af af 29 a3 38 lda $38a329 LDA DOS_SECTOR+BPB_VOLUMEID+2 +.3968b3 8f 28 a0 38 sta $38a028 STA @l VOLUME_ID+2 +.3968b7 80 0d bra $3968c6 BRA ret_success +.3968b9 no_volume_id +.3968b9 c2 20 rep #$20 REP #$20 ; set A long +.3968bb a9 00 00 lda #$0000 LDA #0 ; No: blank the Volume ID +.3968be 8f 26 a0 38 sta $38a026 STA @l VOLUME_ID +.3968c2 8f 28 a0 38 sta $38a028 STA @L VOLUME_ID+2 +.3968c6 ret_success +.3968c6 e2 20 sep #$20 SEP #$20 ; set A short +.3968c8 a9 00 lda #$00 LDA #0 +.3968ca 85 20 sta $0320 STA BIOS_STATUS +.3968cc 28 plp PLP .3968cd 2b pld PLD .3968ce ab plb PLB -.3968cf 18 clc CLC +.3968cf 38 sec SEC .3968d0 6b rtl RTL -.3968d1 FDC_CMDBLOCK -.3968d1 8b phb PHB -.3968d2 0b phd PHD -.3968d3 08 php PHP -.3968d4 48 pha PHA ; begin setdbr macro -.3968d5 08 php PHP -.3968d6 e2 20 sep #$20 SEP #$20 ; set A short -.3968d8 a9 00 lda #$00 LDA #0 -.3968da 48 pha PHA -.3968db ab plb PLB -.3968dc 28 plp PLP -.3968dd 68 pla PLA ; end setdbr macro -.3968de 48 pha PHA ; begin setdp macro -.3968df 08 php PHP -.3968e0 c2 20 rep #$20 REP #$20 ; set A long -.3968e2 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.3968e5 5b tcd TCD -.3968e6 28 plp PLP -.3968e7 68 pla PLA ; end setdp macro -.3968e8 e2 30 sep #$30 SEP #$30 ; set A&X short -.3968ea e0 01 cpx #$01 CPX #FDC_DEVCMD_MOTOR_ON -.3968ec f0 0f beq $3968fd BEQ motor_on -.3968ee e0 02 cpx #$02 CPX #FDC_DEVCMD_MOTOR_OFF -.3968f0 f0 11 beq $396903 BEQ motor_off -.3968f2 e0 03 cpx #$03 CPX #FDC_DEVCMD_RECAL -.3968f4 f0 13 beq $396909 BEQ recalibrate -.3968f6 64 20 stz $0320 ret_success STZ BIOS_STATUS -.3968f8 28 plp PLP -.3968f9 2b pld PLD -.3968fa ab plb PLB -.3968fb 38 sec SEC -.3968fc 6b rtl RTL -.3968fd 22 91 62 39 jsl $396291 motor_on JSL FDC_Motor_On -.396901 80 f3 bra $3968f6 BRA ret_success -.396903 22 c5 62 39 jsl $3962c5 motor_off JSL FDC_Motor_Off -.396907 80 ed bra $3968f6 BRA ret_success -.396909 22 f0 62 39 jsl $3962f0 recalibrate JSL FDC_Recalibrate_Command -.39690d b0 e7 bcs $3968f6 BCS ret_success -.39690f 28 plp pass_failure PLP -.396910 2b pld PLD -.396911 ab plb PLB -.396912 18 clc CLC -.396913 6b rtl RTL -.396914 FDC_CHK_MEDIA -.396914 0b phd PHD -.396915 08 php PHP -.396916 48 pha PHA ; begin setdp macro -.396917 08 php PHP -.396918 c2 20 rep #$20 REP #$20 ; set A long -.39691a a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 -.39691d 5b tcd TCD -.39691e 28 plp PLP -.39691f 68 pla PLA ; end setdp macro -.396920 22 91 62 39 jsl $396291 JSL FDC_Motor_On ; Turn on the motor -.396924 e2 20 sep #$20 SEP #$20 ; set A short -.396926 af f7 13 af lda $af13f7 LDA @l SIO_FDC_DIR ; Check if the DSKCHG bit is set -.39692a 89 80 bit #$80 BIT #FDC_DIR_DSKCHG -.39692c f0 42 beq $396970 BEQ ret_true ; If not: assume the disk is present -.39692e a9 00 lda #$00 LDA #0 -.396930 85 00 sta $0300 STA FDC_DRIVE -.396932 a9 00 lda #$00 LDA #0 -.396934 85 01 sta $0301 STA FDC_HEAD -.396936 a9 50 lda #$50 LDA #80 -.396938 85 02 sta $0302 STA FDC_CYLINDER -.39693a 22 d0 64 39 jsl $3964d0 JSL FDC_Seek_Track ; Attempt to seek to track 80 -.39693e 90 34 bcc $396974 BCC ret_false ; If fail: return false -.396940 c2 10 rep #$10 REP #$10 ; set X long -.396942 a2 1e 8b ldx #$8b1e LDX #<>FDC_MOTOR_TIME ; Wait a suitable time for the motor to spin up -.396945 a0 41 00 ldy #$0041 LDY #`FDC_MOTOR_TIME -.396948 22 26 16 39 jsl $391626 JSL IDELAY -.39694c 22 25 63 39 jsl $396325 JSL FDC_Sense_Int_Status -.396950 a5 06 lda $0306 LDA FDC_ST0 -.396952 29 d0 and #$d0 AND #%11010000 -.396954 d0 1e bne $396974 BNE ret_false -.396956 22 f0 62 39 jsl $3962f0 JSL FDC_Recalibrate_Command ; Attempt to recalibrate -.39695a 90 18 bcc $396974 BCC ret_false ; If fail: return false -.39695c a2 1e 8b ldx #$8b1e LDX #<>FDC_MOTOR_TIME ; Wait a suitable time for the motor to spin up -.39695f a0 41 00 ldy #$0041 LDY #`FDC_MOTOR_TIME -.396962 22 26 16 39 jsl $391626 JSL IDELAY -.396966 22 25 63 39 jsl $396325 JSL FDC_Sense_Int_Status -.39696a a5 06 lda $0306 LDA FDC_ST0 -.39696c 29 d0 and #$d0 AND #%11010000 -.39696e d0 04 bne $396974 BNE ret_false -.396970 ret_true -.396970 28 plp PLP -.396971 2b pld PLD -.396972 38 sec SEC -.396973 6b rtl RTL -.396974 ret_false -.396974 28 plp PLP -.396975 2b pld PLD -.396976 18 clc CLC -.396977 6b rtl RTL -.396978 FDC_WRITEVBR -.396978 8b phb PHB -.396979 0b phd PHD -.39697a 08 php PHP -.39697b 48 pha PHA ; begin setdbr macro -.39697c 08 php PHP -.39697d e2 20 sep #$20 SEP #$20 ; set A short -.39697f a9 00 lda #$00 LDA #0 -.396981 48 pha PHA -.396982 ab plb PLB -.396983 28 plp PLP -.396984 68 pla PLA ; end setdbr macro -.396985 48 pha PHA ; begin setdp macro -.396986 08 php PHP -.396987 c2 20 rep #$20 REP #$20 ; set A long -.396989 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.39698c 5b tcd TCD -.39698d 28 plp PLP -.39698e 68 pla PLA ; end setdp macro -.39698f 22 a7 67 39 jsl $3967a7 JSL FDC_MOUNT ; Mount the floppy disk -.396993 c2 30 rep #$30 REP #$30 ; set A&X long -.396995 a9 00 00 lda #$0000 LDA #0 ; Clear the sector buffer -.396998 a2 00 00 ldx #$0000 LDX #0 -.39699b 9f 00 a3 38 sta $38a300,x clr_loop STA DOS_SECTOR,X -.39699f e8 inx INX -.3969a0 e8 inx INX -.3969a1 e0 00 02 cpx #$0200 CPX #512 -.3969a4 d0 f5 bne $39699b BNE clr_loop -.3969a6 e2 20 sep #$20 SEP #$20 ; set A short -.3969a8 a2 00 00 ldx #$0000 LDX #0 ; Copy the prototype VBR to the sector buffer -.3969ab bf 60 6a 39 lda $396a60,x copy_loop LDA FDC_VBR_BEGIN,X -.3969af 9f 00 a3 38 sta $38a300,x STA DOS_SECTOR,X -.3969b3 e8 inx INX -.3969b4 e0 c9 00 cpx #$00c9 CPX #<>(FDC_VBR_END - FDC_VBR_BEGIN + 1) -.3969b7 d0 f2 bne $3969ab BNE copy_loop -.3969b9 a0 00 00 ldy #$0000 LDY #0 ; Copy the boot binary path to the VBR -.3969bc a2 40 00 ldx #$0040 LDX #FDC_VBR_PATH -.3969bf b7 3c lda [$035c],y path_copy_loop LDA [DOS_RUN_PTR],Y -.3969c1 9f 00 a3 38 sta $38a300,x STA DOS_SECTOR,X -.3969c5 f0 07 beq $3969ce BEQ path_copy_done -.3969c7 e8 inx INX -.3969c8 c8 iny INY -.3969c9 c0 80 00 cpy #$0080 CPY #128 -.3969cc d0 f1 bne $3969bf BNE path_copy_loop -.3969ce path_copy_done -.3969ce c2 20 rep #$20 REP #$20 ; set A long -.3969d0 a9 55 aa lda #$aa55 LDA #$AA55 ; Set the VBR signature bytes at the end -.3969d3 8f fe a4 38 sta $38a4fe STA DOS_SECTOR+BPB_SIGNATURE -.3969d7 c2 20 rep #$20 REP #$20 ; set A long -.3969d9 a9 00 a3 lda #$a300 LDA #<>DOS_SECTOR ; Point to the BIOS buffer -.3969dc 85 06 sta $0326 STA BIOS_BUFF_PTR -.3969de a9 38 00 lda #$0038 LDA #`DOS_SECTOR -.3969e1 85 08 sta $0328 STA BIOS_BUFF_PTR+2 -.3969e3 a9 00 00 lda #$0000 LDA #0 ; Set the sector to #0 (boot record) -.3969e6 85 02 sta $0322 STA BIOS_LBA -.3969e8 85 04 sta $0324 STA BIOS_LBA+2 -.3969ea e2 20 sep #$20 SEP #$20 ; set A short -.3969ec a9 00 lda #$00 LDA #BIOS_DEV_FDC -.3969ee 85 01 sta $0321 STA BIOS_DEV -.3969f0 22 24 10 00 jsl $001024 JSL PUTBLOCK ; Attempt to write the boot record -.3969f4 b0 09 bcs $3969ff BCS ret_success -.3969f6 22 c5 62 39 jsl $3962c5 JSL FDC_Motor_Off -.3969fa 28 plp PLP ; Return the failure -.3969fb 2b pld PLD -.3969fc ab plb PLB -.3969fd 18 clc CLC -.3969fe 6b rtl RTL -.3969ff 22 c5 62 39 jsl $3962c5 ret_success JSL FDC_Motor_Off -.396a03 e2 20 sep #$20 SEP #$20 ; set A short -.396a05 a9 00 lda #$00 LDA #0 -.396a07 85 00 sta $0320 STA BIOS_STATUS -.396a09 28 plp PLP -.396a0a 2b pld PLD -.396a0b ab plb PLB -.396a0c 38 sec SEC -.396a0d 6b rtl RTL -.396a0e FDC_TIME_HANDLE -.396a0e 08 php PHP -.396a0f e2 20 sep #$20 SEP #$20 ; set A short -.396a11 af 4e a0 38 lda $38a04e LDA @l FDC_MOTOR_TIMER ; Check the FDC motor count-down timer -.396a15 d0 06 bne $396a1d BNE dec_motor ; If not zero: decrement the timer -.396a17 af 4f a0 38 lda $38a04f LDA @l FDC_MOTOR_TIMER+1 ; Check the high byte -.396a1b f0 28 beq $396a45 BEQ sof_timeout ; If zero: move on to the next timer -.396a1d af 4e a0 38 lda $38a04e dec_motor LDA @l FDC_MOTOR_TIMER ; Decrement the low byte -.396a21 3a dec a DEC A -.396a22 8f 4e a0 38 sta $38a04e STA @l FDC_MOTOR_TIMER -.396a26 c9 ff cmp #$ff CMP #$FF ; Did it roll over? -.396a28 d0 0b bne $396a35 BNE chk_motor_end ; No: check to see if we're a the end -.396a2a af 4f a0 38 lda $38a04f LDA @l FDC_MOTOR_TIMER+1 ; Decrement the high byte -.396a2e 3a dec a DEC A -.396a2f 8f 4f a0 38 sta $38a04f STA @l FDC_MOTOR_TIMER+1 -.396a33 80 10 bra $396a45 BRA sof_timeout ; And move on to the next timer -.396a35 af 4e a0 38 lda $38a04e chk_motor_end LDA @l FDC_MOTOR_TIMER ; Check timer -.396a39 d0 0a bne $396a45 BNE sof_timeout ; if it's <>0, move on to the next timer -.396a3b af 4f a0 38 lda $38a04f LDA @l FDC_MOTOR_TIMER+1 -.396a3f d0 04 bne $396a45 BNE sof_timeout -.396a41 22 c5 62 39 jsl $3962c5 JSL FDC_Motor_Off ; Otherwise, turn off the motor -.396a45 sof_timeout -.396a45 e2 20 sep #$20 SEP #$20 ; set A short -.396a47 af 2d 03 00 lda $00032d LDA @l BIOS_TIMER ; Check the BIOS_TIMER -.396a4b f0 11 beq $396a5e BEQ sof_int_done ; If it's 0, we don't do anything -.396a4d 3a dec a DEC A ; Count down one tick -.396a4e 8f 2d 03 00 sta $00032d STA @l BIOS_TIMER -.396a52 d0 0a bne $396a5e BNE sof_int_done ; If not 0, we're done -.396a54 af 2c 03 00 lda $00032c LDA @l BIOS_FLAGS ; Otherwise: flag a time out event -.396a58 09 80 ora #$80 ORA #BIOS_TIMEOUT -.396a5a 8f 2c 03 00 sta $00032c STA @l BIOS_FLAGS -.396a5e 28 plp sof_int_done PLP -.396a5f 6b rtl RTL +.3968d1 28 plp pass_failure PLP +.3968d2 2b pld PLD +.3968d3 ab plb PLB +.3968d4 18 clc CLC +.3968d5 6b rtl RTL +.3968d6 FDC_CMDBLOCK +.3968d6 8b phb PHB +.3968d7 0b phd PHD +.3968d8 08 php PHP +.3968d9 48 pha PHA ; begin setdbr macro +.3968da 08 php PHP +.3968db e2 20 sep #$20 SEP #$20 ; set A short +.3968dd a9 00 lda #$00 LDA #0 +.3968df 48 pha PHA +.3968e0 ab plb PLB +.3968e1 28 plp PLP +.3968e2 68 pla PLA ; end setdbr macro +.3968e3 48 pha PHA ; begin setdp macro +.3968e4 08 php PHP +.3968e5 c2 20 rep #$20 REP #$20 ; set A long +.3968e7 a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.3968ea 5b tcd TCD +.3968eb 28 plp PLP +.3968ec 68 pla PLA ; end setdp macro +.3968ed e2 30 sep #$30 SEP #$30 ; set A&X short +.3968ef e0 01 cpx #$01 CPX #FDC_DEVCMD_MOTOR_ON +.3968f1 f0 0f beq $396902 BEQ motor_on +.3968f3 e0 02 cpx #$02 CPX #FDC_DEVCMD_MOTOR_OFF +.3968f5 f0 11 beq $396908 BEQ motor_off +.3968f7 e0 03 cpx #$03 CPX #FDC_DEVCMD_RECAL +.3968f9 f0 13 beq $39690e BEQ recalibrate +.3968fb 64 20 stz $0320 ret_success STZ BIOS_STATUS +.3968fd 28 plp PLP +.3968fe 2b pld PLD +.3968ff ab plb PLB +.396900 38 sec SEC +.396901 6b rtl RTL +.396902 22 96 62 39 jsl $396296 motor_on JSL FDC_Motor_On +.396906 80 f3 bra $3968fb BRA ret_success +.396908 22 ca 62 39 jsl $3962ca motor_off JSL FDC_Motor_Off +.39690c 80 ed bra $3968fb BRA ret_success +.39690e 22 f5 62 39 jsl $3962f5 recalibrate JSL FDC_Recalibrate_Command +.396912 b0 e7 bcs $3968fb BCS ret_success +.396914 28 plp pass_failure PLP +.396915 2b pld PLD +.396916 ab plb PLB +.396917 18 clc CLC +.396918 6b rtl RTL +.396919 FDC_CHK_MEDIA +.396919 0b phd PHD +.39691a 08 php PHP +.39691b 48 pha PHA ; begin setdp macro +.39691c 08 php PHP +.39691d c2 20 rep #$20 REP #$20 ; set A long +.39691f a9 00 03 lda #$0300 LDA #FDC_DRIVE ; set DP to page 0 +.396922 5b tcd TCD +.396923 28 plp PLP +.396924 68 pla PLA ; end setdp macro +.396925 22 96 62 39 jsl $396296 JSL FDC_Motor_On ; Turn on the motor +.396929 e2 20 sep #$20 SEP #$20 ; set A short +.39692b af f7 13 af lda $af13f7 LDA @l SIO_FDC_DIR ; Check if the DSKCHG bit is set +.39692f 89 80 bit #$80 BIT #FDC_DIR_DSKCHG +.396931 f0 42 beq $396975 BEQ ret_true ; If not: assume the disk is present +.396933 a9 00 lda #$00 LDA #0 +.396935 85 00 sta $0300 STA FDC_DRIVE +.396937 a9 00 lda #$00 LDA #0 +.396939 85 01 sta $0301 STA FDC_HEAD +.39693b a9 50 lda #$50 LDA #80 +.39693d 85 02 sta $0302 STA FDC_CYLINDER +.39693f 22 d5 64 39 jsl $3964d5 JSL FDC_Seek_Track ; Attempt to seek to track 80 +.396943 90 34 bcc $396979 BCC ret_false ; If fail: return false +.396945 c2 10 rep #$10 REP #$10 ; set X long +.396947 a2 1e 8b ldx #$8b1e LDX #<>FDC_MOTOR_TIME ; Wait a suitable time for the motor to spin up +.39694a a0 41 00 ldy #$0041 LDY #`FDC_MOTOR_TIME +.39694d 22 26 16 39 jsl $391626 JSL IDELAY +.396951 22 2a 63 39 jsl $39632a JSL FDC_Sense_Int_Status +.396955 a5 06 lda $0306 LDA FDC_ST0 +.396957 29 d0 and #$d0 AND #%11010000 +.396959 d0 1e bne $396979 BNE ret_false +.39695b 22 f5 62 39 jsl $3962f5 JSL FDC_Recalibrate_Command ; Attempt to recalibrate +.39695f 90 18 bcc $396979 BCC ret_false ; If fail: return false +.396961 a2 1e 8b ldx #$8b1e LDX #<>FDC_MOTOR_TIME ; Wait a suitable time for the motor to spin up +.396964 a0 41 00 ldy #$0041 LDY #`FDC_MOTOR_TIME +.396967 22 26 16 39 jsl $391626 JSL IDELAY +.39696b 22 2a 63 39 jsl $39632a JSL FDC_Sense_Int_Status +.39696f a5 06 lda $0306 LDA FDC_ST0 +.396971 29 d0 and #$d0 AND #%11010000 +.396973 d0 04 bne $396979 BNE ret_false +.396975 ret_true +.396975 28 plp PLP +.396976 2b pld PLD +.396977 38 sec SEC +.396978 6b rtl RTL +.396979 ret_false +.396979 28 plp PLP +.39697a 2b pld PLD +.39697b 18 clc CLC +.39697c 6b rtl RTL +.39697d FDC_WRITEVBR +.39697d 8b phb PHB +.39697e 0b phd PHD +.39697f 08 php PHP +.396980 48 pha PHA ; begin setdbr macro +.396981 08 php PHP +.396982 e2 20 sep #$20 SEP #$20 ; set A short +.396984 a9 00 lda #$00 LDA #0 +.396986 48 pha PHA +.396987 ab plb PLB +.396988 28 plp PLP +.396989 68 pla PLA ; end setdbr macro +.39698a 48 pha PHA ; begin setdp macro +.39698b 08 php PHP +.39698c c2 20 rep #$20 REP #$20 ; set A long +.39698e a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.396991 5b tcd TCD +.396992 28 plp PLP +.396993 68 pla PLA ; end setdp macro +.396994 22 ac 67 39 jsl $3967ac JSL FDC_MOUNT ; Mount the floppy disk +.396998 c2 30 rep #$30 REP #$30 ; set A&X long +.39699a a9 00 00 lda #$0000 LDA #0 ; Clear the sector buffer +.39699d a2 00 00 ldx #$0000 LDX #0 +.3969a0 9f 00 a3 38 sta $38a300,x clr_loop STA DOS_SECTOR,X +.3969a4 e8 inx INX +.3969a5 e8 inx INX +.3969a6 e0 00 02 cpx #$0200 CPX #512 +.3969a9 d0 f5 bne $3969a0 BNE clr_loop +.3969ab e2 20 sep #$20 SEP #$20 ; set A short +.3969ad a2 00 00 ldx #$0000 LDX #0 ; Copy the prototype VBR to the sector buffer +.3969b0 bf 65 6a 39 lda $396a65,x copy_loop LDA FDC_VBR_BEGIN,X +.3969b4 9f 00 a3 38 sta $38a300,x STA DOS_SECTOR,X +.3969b8 e8 inx INX +.3969b9 e0 c9 00 cpx #$00c9 CPX #<>(FDC_VBR_END - FDC_VBR_BEGIN + 1) +.3969bc d0 f2 bne $3969b0 BNE copy_loop +.3969be a0 00 00 ldy #$0000 LDY #0 ; Copy the boot binary path to the VBR +.3969c1 a2 40 00 ldx #$0040 LDX #FDC_VBR_PATH +.3969c4 b7 3c lda [$035c],y path_copy_loop LDA [DOS_RUN_PTR],Y +.3969c6 9f 00 a3 38 sta $38a300,x STA DOS_SECTOR,X +.3969ca f0 07 beq $3969d3 BEQ path_copy_done +.3969cc e8 inx INX +.3969cd c8 iny INY +.3969ce c0 80 00 cpy #$0080 CPY #128 +.3969d1 d0 f1 bne $3969c4 BNE path_copy_loop +.3969d3 path_copy_done +.3969d3 c2 20 rep #$20 REP #$20 ; set A long +.3969d5 a9 55 aa lda #$aa55 LDA #$AA55 ; Set the VBR signature bytes at the end +.3969d8 8f fe a4 38 sta $38a4fe STA DOS_SECTOR+BPB_SIGNATURE +.3969dc c2 20 rep #$20 REP #$20 ; set A long +.3969de a9 00 a3 lda #$a300 LDA #<>DOS_SECTOR ; Point to the BIOS buffer +.3969e1 85 06 sta $0326 STA BIOS_BUFF_PTR +.3969e3 a9 38 00 lda #$0038 LDA #`DOS_SECTOR +.3969e6 85 08 sta $0328 STA BIOS_BUFF_PTR+2 +.3969e8 a9 00 00 lda #$0000 LDA #0 ; Set the sector to #0 (boot record) +.3969eb 85 02 sta $0322 STA BIOS_LBA +.3969ed 85 04 sta $0324 STA BIOS_LBA+2 +.3969ef e2 20 sep #$20 SEP #$20 ; set A short +.3969f1 a9 00 lda #$00 LDA #BIOS_DEV_FDC +.3969f3 85 01 sta $0321 STA BIOS_DEV +.3969f5 22 24 10 00 jsl $001024 JSL PUTBLOCK ; Attempt to write the boot record +.3969f9 b0 09 bcs $396a04 BCS ret_success +.3969fb 22 ca 62 39 jsl $3962ca JSL FDC_Motor_Off +.3969ff 28 plp PLP ; Return the failure +.396a00 2b pld PLD +.396a01 ab plb PLB +.396a02 18 clc CLC +.396a03 6b rtl RTL +.396a04 22 ca 62 39 jsl $3962ca ret_success JSL FDC_Motor_Off +.396a08 e2 20 sep #$20 SEP #$20 ; set A short +.396a0a a9 00 lda #$00 LDA #0 +.396a0c 85 00 sta $0320 STA BIOS_STATUS +.396a0e 28 plp PLP +.396a0f 2b pld PLD +.396a10 ab plb PLB +.396a11 38 sec SEC +.396a12 6b rtl RTL +.396a13 FDC_TIME_HANDLE +.396a13 08 php PHP +.396a14 e2 20 sep #$20 SEP #$20 ; set A short +.396a16 af 4e a0 38 lda $38a04e LDA @l FDC_MOTOR_TIMER ; Check the FDC motor count-down timer +.396a1a d0 06 bne $396a22 BNE dec_motor ; If not zero: decrement the timer +.396a1c af 4f a0 38 lda $38a04f LDA @l FDC_MOTOR_TIMER+1 ; Check the high byte +.396a20 f0 28 beq $396a4a BEQ sof_timeout ; If zero: move on to the next timer +.396a22 af 4e a0 38 lda $38a04e dec_motor LDA @l FDC_MOTOR_TIMER ; Decrement the low byte +.396a26 3a dec a DEC A +.396a27 8f 4e a0 38 sta $38a04e STA @l FDC_MOTOR_TIMER +.396a2b c9 ff cmp #$ff CMP #$FF ; Did it roll over? +.396a2d d0 0b bne $396a3a BNE chk_motor_end ; No: check to see if we're a the end +.396a2f af 4f a0 38 lda $38a04f LDA @l FDC_MOTOR_TIMER+1 ; Decrement the high byte +.396a33 3a dec a DEC A +.396a34 8f 4f a0 38 sta $38a04f STA @l FDC_MOTOR_TIMER+1 +.396a38 80 10 bra $396a4a BRA sof_timeout ; And move on to the next timer +.396a3a af 4e a0 38 lda $38a04e chk_motor_end LDA @l FDC_MOTOR_TIMER ; Check timer +.396a3e d0 0a bne $396a4a BNE sof_timeout ; if it's <>0, move on to the next timer +.396a40 af 4f a0 38 lda $38a04f LDA @l FDC_MOTOR_TIMER+1 +.396a44 d0 04 bne $396a4a BNE sof_timeout +.396a46 22 ca 62 39 jsl $3962ca JSL FDC_Motor_Off ; Otherwise, turn off the motor +.396a4a sof_timeout +.396a4a e2 20 sep #$20 SEP #$20 ; set A short +.396a4c af 2d 03 00 lda $00032d LDA @l BIOS_TIMER ; Check the BIOS_TIMER +.396a50 f0 11 beq $396a63 BEQ sof_int_done ; If it's 0, we don't do anything +.396a52 3a dec a DEC A ; Count down one tick +.396a53 8f 2d 03 00 sta $00032d STA @l BIOS_TIMER +.396a57 d0 0a bne $396a63 BNE sof_int_done ; If not 0, we're done +.396a59 af 2c 03 00 lda $00032c LDA @l BIOS_FLAGS ; Otherwise: flag a time out event +.396a5d 09 80 ora #$80 ORA #BIOS_TIMEOUT +.396a5f 8f 2c 03 00 sta $00032c STA @l BIOS_FLAGS +.396a63 28 plp sof_int_done PLP +.396a64 6b rtl RTL =62 FDC_BOOT_START = 62 ; Entry point to the boot code =64 FDC_VBR_PATH = 64 ; Offset to the path in the VBR -.396a60 FDC_VBR_BEGIN ->396a60 eb 00 90 start .byte $EB, $00, $90 ; Entry point ->396a63 43 32 35 36 44 4f 53 20 magic .text "C256DOS " ; OEM name / magic text for booting ->396a6b 00 02 bytes_per_sec .word 512 ; How many bytes per sector ->396a6d 01 sec_per_cluster .byte 1 ; How many sectors per cluster ->396a6e 01 00 rsrv_sectors .word 1 ; Number of reserved sectors ->396a70 02 num_fat .byte 2 ; Number of FATs ->396a71 e0 00 max_dir_entry .word (32-18)*16 ; Total number of root dir entries ->396a73 40 0b total_sectors .word 2880 ; Total sectors ->396a75 f0 media_descriptor .byte $F0 ; 3.5" 1.44 MB floppy 80 tracks, 18 tracks per sector ->396a76 09 00 sec_per_fat .word 9 ; Sectors per FAT ->396a78 12 00 sec_per_track .word 18 ; Sectors per track ->396a7a 02 00 num_head .word 2 ; Number of heads ->396a7c 00 00 00 00 ignore2 .dword 0 ->396a80 00 00 00 00 fat32_sector .dword 0 ; # of sectors in FAT32 ->396a84 00 00 ignore3 .word 0 ->396a86 29 boot_signature .byte $29 ->396a87 78 56 34 12 volume_id .dword $12345678 ; Replaced by code ->396a8b 55 4e 54 49 54 4c 45 44 volume_name .text "UNTITLED " ; Replace by code ->396a93 20 20 20 ->396a96 46 41 54 31 32 20 20 20 fs_type .text "FAT12 " -.396a9e 80 40 bra $396ae0 BRA vbr_start ->396aa0 file_path .fill 64 ; Reserve 64 bytes for a path and any options -.396ae0 vbr_start -.396ae0 c2 20 rep #$20 REP #$20 ; set A long -.396ae2 a9 40 a3 lda #$a340 LDA #<>(DOS_SECTOR + (file_path - FDC_VBR_BEGIN)) -.396ae5 8f 60 03 00 sta $000360 STA @l DOS_RUN_PARAM -.396ae9 a9 38 00 lda #$0038 LDA #`(DOS_SECTOR + (file_path - FDC_VBR_BEGIN)) -.396aec 8f 62 03 00 sta $000362 STA @l DOS_RUN_PARAM+2 -.396af0 22 8d 59 39 jsl $39598d JSL IF_RUN ; And try to execute the binary file -.396af4 b0 0c bcs $396b02 BCS lock ; If it returned success... lock up... I guess? -.396af6 error -.396af6 e2 20 sep #$20 SEP #$20 ; set A short -.396af8 4b phk PHK ; Otherwise, print an error message -.396af9 ab plb PLB -.396afa 62 08 00 per $396b05 PER message -.396afd fa plx PLX -.396afe 22 1c 10 00 jsl $00101c JSL PUTS -.396b02 ea nop lock NOP ; And lock up -.396b03 80 fd bra $396b02 BRA lock ->396b05 43 6f 75 6c 64 20 6e 6f message .null "Could not find a bootable binary.",13 ->396b0d 74 20 66 69 6e 64 20 61 20 62 6f 6f 74 61 62 6c ->396b1d 65 20 62 69 6e 61 72 79 2e 0d 00 -.396b28 FDC_VBR_END +.396a65 FDC_VBR_BEGIN +>396a65 eb 00 90 start .byte $EB, $00, $90 ; Entry point +>396a68 43 32 35 36 44 4f 53 20 magic .text "C256DOS " ; OEM name / magic text for booting +>396a70 00 02 bytes_per_sec .word 512 ; How many bytes per sector +>396a72 01 sec_per_cluster .byte 1 ; How many sectors per cluster +>396a73 01 00 rsrv_sectors .word 1 ; Number of reserved sectors +>396a75 02 num_fat .byte 2 ; Number of FATs +>396a76 e0 00 max_dir_entry .word (32-18)*16 ; Total number of root dir entries +>396a78 40 0b total_sectors .word 2880 ; Total sectors +>396a7a f0 media_descriptor .byte $F0 ; 3.5" 1.44 MB floppy 80 tracks, 18 tracks per sector +>396a7b 09 00 sec_per_fat .word 9 ; Sectors per FAT +>396a7d 12 00 sec_per_track .word 18 ; Sectors per track +>396a7f 02 00 num_head .word 2 ; Number of heads +>396a81 00 00 00 00 ignore2 .dword 0 +>396a85 00 00 00 00 fat32_sector .dword 0 ; # of sectors in FAT32 +>396a89 00 00 ignore3 .word 0 +>396a8b 29 boot_signature .byte $29 +>396a8c 78 56 34 12 volume_id .dword $12345678 ; Replaced by code +>396a90 55 4e 54 49 54 4c 45 44 volume_name .text "UNTITLED " ; Replace by code +>396a98 20 20 20 +>396a9b 46 41 54 31 32 20 20 20 fs_type .text "FAT12 " +.396aa3 80 40 bra $396ae5 BRA vbr_start +>396aa5 file_path .fill 64 ; Reserve 64 bytes for a path and any options +.396ae5 vbr_start +.396ae5 c2 20 rep #$20 REP #$20 ; set A long +.396ae7 a9 40 a3 lda #$a340 LDA #<>(DOS_SECTOR + (file_path - FDC_VBR_BEGIN)) +.396aea 8f 60 03 00 sta $000360 STA @l DOS_RUN_PARAM +.396aee a9 38 00 lda #$0038 LDA #`(DOS_SECTOR + (file_path - FDC_VBR_BEGIN)) +.396af1 8f 62 03 00 sta $000362 STA @l DOS_RUN_PARAM+2 +.396af5 22 92 59 39 jsl $395992 JSL IF_RUN ; And try to execute the binary file +.396af9 b0 0c bcs $396b07 BCS lock ; If it returned success... lock up... I guess? +.396afb error +.396afb e2 20 sep #$20 SEP #$20 ; set A short +.396afd 4b phk PHK ; Otherwise, print an error message +.396afe ab plb PLB +.396aff 62 08 00 per $396b0a PER message +.396b02 fa plx PLX +.396b03 22 1c 10 00 jsl $00101c JSL PUTS +.396b07 ea nop lock NOP ; And lock up +.396b08 80 fd bra $396b07 BRA lock +>396b0a 43 6f 75 6c 64 20 6e 6f message .null "Could not find a bootable binary.",13 +>396b12 74 20 66 69 6e 64 20 61 20 62 6f 6f 74 61 62 6c +>396b22 65 20 62 69 6e 61 72 79 2e 0d 00 +.396b2d FDC_VBR_END ;****** Return to file: src\kernel.asm @@ -13144,520 +13146,520 @@ >00c8 00 00 00 00 00 00 00 00 Tot_Num_Add_Logic_Sec .word $0000, $0000, $0000, $0000 >00d0 00 00 Streaming_Trf_Time .word $0000 ; Word 104 >00d2 00 00 Reserved5 .word $0000 ; Word 105 -.396b28 IDE_TEST -.396b28 08 php PHP -.396b29 c2 20 rep #$20 REP #$20 ; set A long -.396b2b a9 00 a3 lda #$a300 LDA #<>DOS_SECTOR -.396b2e 8f 26 03 00 sta $000326 STA @l BIOS_BUFF_PTR -.396b32 a9 38 00 lda #$0038 LDA #`DOS_SECTOR -.396b35 8f 28 03 00 sta $000328 STA @l BIOS_BUFF_PTR+2 -.396b39 22 56 6c 39 jsl $396c56 JSL IDE_IDENTIFY -.396b3d b0 03 bcs $396b42 BCS id_ok -.396b3f 82 ab 00 brl $396bed BRL done -.396b42 id_ok -.396b42 c2 10 rep #$10 REP #$10 ; set X long -.396b44 e2 20 sep #$20 SEP #$20 ; set A short -.396b46 a0 28 00 ldy #$0028 LDY #40 -.396b49 a2 36 00 ldx #$0036 LDX #27*2 -.396b4c bf 01 a3 38 lda $38a301,x pr_model LDA DOS_SECTOR+1,X -.396b50 22 18 10 00 jsl $001018 JSL PUTC -.396b54 bf 00 a3 38 lda $38a300,x LDA DOS_SECTOR,X -.396b58 22 18 10 00 jsl $001018 JSL PUTC -.396b5c e8 inx INX -.396b5d e8 inx INX -.396b5e 88 dey DEY -.396b5f 88 dey DEY -.396b60 d0 ea bne $396b4c BNE pr_model -.396b62 c2 10 rep #$10 REP #$10 ; set X long -.396b64 e2 20 sep #$20 SEP #$20 ; set A short -.396b66 a0 14 00 ldy #$0014 LDY #20 -.396b69 a2 14 00 ldx #$0014 LDX #10*2 -.396b6c bf 01 a3 38 lda $38a301,x pr_serial LDA DOS_SECTOR+1,X -.396b70 22 18 10 00 jsl $001018 JSL PUTC -.396b74 bf 00 a3 38 lda $38a300,x LDA DOS_SECTOR,X -.396b78 22 18 10 00 jsl $001018 JSL PUTC -.396b7c e8 inx INX -.396b7d e8 inx INX -.396b7e 88 dey DEY -.396b7f 88 dey DEY -.396b80 d0 ea bne $396b6c BNE pr_serial -.396b82 22 6c 10 00 jsl $00106c JSL PRINTCR -.396b86 c2 30 rep #$30 REP #$30 ; set A&X long -.396b88 a9 01 00 lda #$0001 LDA #1 ; Set LBA = 1 -.396b8b 8f 22 03 00 sta $000322 STA @l BIOS_LBA -.396b8f a9 00 00 lda #$0000 LDA #0 -.396b92 8f 24 03 00 sta $000324 STA @l BIOS_LBA+2 -.396b96 a9 00 a3 lda #$a300 LDA #<>DOS_SECTOR -.396b99 8f 26 03 00 sta $000326 STA @l BIOS_BUFF_PTR -.396b9d a9 38 00 lda #$0038 LDA #`DOS_SECTOR -.396ba0 8f 28 03 00 sta $000328 STA @l BIOS_BUFF_PTR+2 -.396ba4 a2 00 00 ldx #$0000 LDX #0 ; Initialize the block to some recognizable data -.396ba7 a9 a5 5a lda #$5aa5 LDA #$5AA5 -.396baa 9f 00 a3 38 sta $38a300,x init_loop STA DOS_SECTOR,X -.396bae e8 inx INX -.396baf e8 inx INX -.396bb0 e0 00 02 cpx #$0200 CPX #512 -.396bb3 d0 f5 bne $396baa BNE init_loop -.396bb5 22 75 6d 39 jsl $396d75 JSL IDE_PUTBLOCK ; Attempt to write the block -.396bb9 b0 06 bcs $396bc1 BCS read_sect1 -.396bbb 22 6c 10 00 jsl $00106c JSL PRINTCR -.396bbf 80 2c bra $396bed BRA done -.396bc1 a9 01 00 lda #$0001 read_sect1 LDA #1 ; Set LBA = 1 -.396bc4 8f 22 03 00 sta $000322 STA @l BIOS_LBA -.396bc8 a9 00 00 lda #$0000 LDA #0 -.396bcb 8f 24 03 00 sta $000324 STA @l BIOS_LBA+2 -.396bcf a9 00 a5 lda #$a500 LDA #<>DOS_FAT_SECTORS -.396bd2 8f 26 03 00 sta $000326 STA @l BIOS_BUFF_PTR -.396bd6 a9 38 00 lda #$0038 LDA #`DOS_FAT_SECTORS -.396bd9 8f 28 03 00 sta $000328 STA @l BIOS_BUFF_PTR+2 -.396bdd 22 e4 6c 39 jsl $396ce4 JSL IDE_GETBLOCK ; Attempt to read the block -.396be1 b0 06 bcs $396be9 BCS all_ok -.396be3 22 6c 10 00 jsl $00106c JSL PRINTCR -.396be7 80 04 bra $396bed BRA done -.396be9 all_ok -.396be9 22 6c 10 00 jsl $00106c JSL PRINTCR -.396bed 28 plp done PLP -.396bee 6b rtl RTL -.396bef IDE_INIT -.396bef e2 20 sep #$20 SEP #$20 ; set A short -.396bf1 20 12 6c jsr $396c12 JSR IDE_DRIVE_BSY ; Check to see if drive is busy -.396bf4 a9 00 lda #$00 LDA #$00 -.396bf6 8f 35 e8 af sta $afe835 STA IDE_CLDR_HI -.396bfa 8f 34 e8 af sta $afe834 STA IDE_CLDR_LO -.396bfe 8f 32 e8 af sta $afe832 STA IDE_SECT_CNT -.396c02 a9 01 lda #$01 LDA #$01 -.396c04 8f 33 e8 af sta $afe833 STA IDE_SECT_SRT -.396c08 a9 a0 lda #$a0 LDA #$A0 ; HEAD 0 - Select Master Drive -.396c0a 8f 36 e8 af sta $afe836 STA IDE_HEAD -.396c0e 20 30 6c jsr $396c30 JSR IDE_DRV_READY_NOTBUSY -.396c11 6b rtl RTL -.396c12 IDE_DRIVE_BSY -.396c12 08 php PHP -.396c13 e2 20 sep #$20 SEP #$20 ; set A short -.396c15 af 37 e8 af lda $afe837 loop LDA @l IDE_CMD_STAT -.396c19 29 80 and #$80 AND #IDE_STAT_BSY ; Check for RDY Bit, this needs to be 1'b1 -.396c1b c9 80 cmp #$80 CMP #IDE_STAT_BSY ; If not go read again -.396c1d f0 f6 beq $396c15 BEQ loop -.396c1f 28 plp PLP -.396c20 60 rts RTS -.396c21 IDE_DRIVE_READY -.396c21 08 php PHP -.396c22 e2 20 sep #$20 SEP #$20 ; set A short -.396c24 af 37 e8 af lda $afe837 loop LDA @l IDE_CMD_STAT -.396c28 29 40 and #$40 AND #IDE_STAT_DRDY ; Check to see if the Busy Signal is Cleared -.396c2a c9 40 cmp #$40 CMP #IDE_STAT_DRDY ; if it is still one, then go back to read again. -.396c2c d0 f6 bne $396c24 BNE loop -.396c2e 28 plp PLP -.396c2f 60 rts RTS -.396c30 IDE_DRV_READY_NOTBUSY -.396c30 08 php PHP -.396c31 e2 20 sep #$20 SEP #$20 ; set A short -.396c33 af 37 e8 af lda $afe837 loop LDA @l IDE_CMD_STAT ; Check the status -.396c37 29 c0 and #$c0 AND #IDE_STAT_BSY | IDE_STAT_DRDY -.396c39 c9 40 cmp #$40 CMP #IDE_STAT_DRDY ; Is it READY but not BUSY? -.396c3b d0 f6 bne $396c33 BNE loop ; No: keep waiting -.396c3d 28 plp ret_success PLP ; Return success -.396c3e 38 sec SEC -.396c3f 60 rts RTS -.396c40 8f 07 03 00 sta $000307 ret_failure STA @l FDC_ST1 ; Save the status code to FDC_ST1 -.396c44 28 plp PLP ; Return failure -.396c45 18 clc CLC -.396c46 60 rts RTS -.396c47 IDE_NOT_DRQ -.396c47 08 php PHP -.396c48 e2 20 sep #$20 SEP #$20 ; set A short -.396c4a af 37 e8 af lda $afe837 loop LDA @l IDE_CMD_STAT ; Get the status -.396c4e 29 08 and #$08 AND #IDE_STAT_DRQ -.396c50 c9 08 cmp #$08 CMP #IDE_STAT_DRQ ; Is the DRQ bit set? -.396c52 d0 f6 bne $396c4a BNE loop ; No: keep waiting -.396c54 28 plp PLP -.396c55 60 rts RTS -.396c56 IDE_IDENTIFY -.396c56 5a phy PHY -.396c57 8b phb PHB -.396c58 0b phd PHD -.396c59 08 php PHP -.396c5a 48 pha PHA ; begin setdbr macro -.396c5b 08 php PHP -.396c5c e2 20 sep #$20 SEP #$20 ; set A short -.396c5e a9 00 lda #$00 LDA #0 -.396c60 48 pha PHA -.396c61 ab plb PLB -.396c62 28 plp PLP -.396c63 68 pla PLA ; end setdbr macro -.396c64 48 pha PHA ; begin setdp macro -.396c65 08 php PHP -.396c66 c2 20 rep #$20 REP #$20 ; set A long -.396c68 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.396c6b 5b tcd TCD -.396c6c 28 plp PLP -.396c6d 68 pla PLA ; end setdp macro -.396c6e e2 20 sep #$20 SEP #$20 ; set A short -.396c70 20 30 6c jsr $396c30 JSR IDE_DRV_READY_NOTBUSY ; Wait until the IDE is clear to accept commands -.396c73 a5 05 lda $0325 LDA BIOS_LBA+3 ; Get the high bits of the LBA -.396c75 29 07 and #$07 AND #$07 -.396c77 09 a0 ora #$a0 ORA #%10100000 ; Select DEV=0 and LBA mode = 1 -.396c79 8f 36 e8 af sta $afe836 STA @l IDE_HEAD ; Ensure master is selected -.396c7d 20 30 6c jsr $396c30 JSR IDE_DRV_READY_NOTBUSY ; And wait for it to take effect -.396c80 e2 20 sep #$20 SEP #$20 ; set A short -.396c82 a9 00 lda #$00 LDA #0 ; Clear sector count and LBA -.396c84 8f 32 e8 af sta $afe832 STA @l IDE_SECT_CNT -.396c88 8f 33 e8 af sta $afe833 STA @l IDE_SECT_SRT -.396c8c 8f 34 e8 af sta $afe834 STA @l IDE_CLDR_LO -.396c90 8f 35 e8 af sta $afe835 STA @l IDE_CLDR_HI -.396c94 a9 ec lda #$ec LDA #IDE_CMD_IDENTIFY ; The IDENTIFY command -.396c96 8f 37 e8 af sta $afe837 STA @l IDE_CMD_STAT ; Check the status -.396c9a f0 29 beq $396cc5 BEQ no_media ; If 0: there is no drive -.396c9c 20 12 6c jsr $396c12 JSR IDE_DRIVE_BSY ; Othewise: wait for drive to not be busy -.396c9f 20 30 6c jsr $396c30 JSR IDE_DRV_READY_NOTBUSY ; Wait for the device to be ready -.396ca2 90 2d bcc $396cd1 BCC ret_failure ; If an error occurred, return it -.396ca4 c2 30 rep #$30 REP #$30 ; set A&X long -.396ca6 a0 00 00 ldy #$0000 LDY #0 -.396ca9 af 38 e8 af lda $afe838 read_loop LDA @l IDE_DATA_LO ; Get the word of data from the device -.396cad 97 06 sta [$0326],y STA [BIOS_BUFF_PTR],Y ; Save it to the buffer -.396caf c8 iny INY ; Move to the next position -.396cb0 c8 iny INY -.396cb1 c0 00 02 cpy #$0200 CPY #512 -.396cb4 d0 f3 bne $396ca9 BNE read_loop -.396cb6 ret_success -.396cb6 e2 20 sep #$20 SEP #$20 ; set A short -.396cb8 a9 00 lda #$00 LDA #0 -.396cba 85 00 sta $0320 STA BIOS_STATUS -.396cbc 8d 06 03 sta $0306 STA @w FDC_ST0 -.396cbf 28 plp PLP ; Return success -.396cc0 2b pld PLD -.396cc1 ab plb PLB -.396cc2 7a ply PLY -.396cc3 38 sec SEC -.396cc4 6b rtl RTL -.396cc5 no_media -.396cc5 e2 20 sep #$20 SEP #$20 ; set A short -.396cc7 a9 87 lda #$87 LDA #BIOS_ERR_NOMEDIA -.396cc9 80 0a bra $396cd5 BRA pass_failure -.396ccb not_ata -.396ccb e2 20 sep #$20 SEP #$20 ; set A short -.396ccd a9 8a lda #$8a LDA #BIOS_ERR_NOTATA -.396ccf 80 04 bra $396cd5 BRA pass_failure -.396cd1 ret_failure -.396cd1 e2 20 sep #$20 SEP #$20 ; set A short -.396cd3 a9 82 lda #$82 LDA #BIOS_ERR_READ -.396cd5 85 00 sta $0320 pass_failure STA BIOS_STATUS -.396cd7 af 31 e8 af lda $afe831 LDA @l IDE_ERROR -.396cdb 8d 06 03 sta $0306 STA @w FDC_ST0 -.396cde 28 plp PLP -.396cdf 2b pld PLD -.396ce0 ab plb PLB -.396ce1 7a ply PLY -.396ce2 18 clc CLC -.396ce3 6b rtl RTL -.396ce4 IDE_GETBLOCK -.396ce4 5a phy PHY -.396ce5 8b phb PHB -.396ce6 0b phd PHD -.396ce7 08 php PHP -.396ce8 48 pha PHA ; begin setdbr macro -.396ce9 08 php PHP -.396cea e2 20 sep #$20 SEP #$20 ; set A short -.396cec a9 00 lda #$00 LDA #0 -.396cee 48 pha PHA -.396cef ab plb PLB -.396cf0 28 plp PLP -.396cf1 68 pla PLA ; end setdbr macro -.396cf2 48 pha PHA ; begin setdp macro -.396cf3 08 php PHP -.396cf4 c2 20 rep #$20 REP #$20 ; set A long -.396cf6 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.396cf9 5b tcd TCD -.396cfa 28 plp PLP -.396cfb 68 pla PLA ; end setdp macro -.396cfc e2 20 sep #$20 SEP #$20 ; set A short -.396cfe 20 30 6c jsr $396c30 JSR IDE_DRV_READY_NOTBUSY ; Wait until the IDE is clear to accept commands -.396d01 a5 05 lda $0325 LDA BIOS_LBA+3 ; Get the high bits of the LBA -.396d03 29 07 and #$07 AND #$07 -.396d05 09 e0 ora #$e0 ORA #%11100000 ; Select DEV=0 and LBA mode = 1 -.396d07 8f 36 e8 af sta $afe836 STA @l IDE_HEAD ; Ensure master is selected -.396d0b 20 30 6c jsr $396c30 JSR IDE_DRV_READY_NOTBUSY ; And wait for it to take effect -.396d0e e2 20 sep #$20 SEP #$20 ; set A short -.396d10 a9 01 lda #$01 LDA #1 ; Set that we want one sector -.396d12 8f 32 e8 af sta $afe832 STA @l IDE_SECT_CNT -.396d16 a5 02 lda $0322 LDA BIOS_LBA ; Set the lower bits of the LBA -.396d18 8f 33 e8 af sta $afe833 STA @l IDE_SECT_SRT -.396d1c a5 03 lda $0323 LDA BIOS_LBA+1 -.396d1e 8f 34 e8 af sta $afe834 STA @l IDE_CLDR_LO -.396d22 a5 04 lda $0324 LDA BIOS_LBA+2 -.396d24 8f 35 e8 af sta $afe835 STA @l IDE_CLDR_HI -.396d28 a9 21 lda #$21 LDA #IDE_CMD_READ_SECTOR ; The READ SECTOR command -.396d2a 8f 37 e8 af sta $afe837 STA @l IDE_CMD_STAT -.396d2e ea nop NOP ; Wait about 500ns -.396d2f ea nop NOP -.396d30 ea nop NOP -.396d31 ea nop NOP -.396d32 20 30 6c jsr $396c30 JSR IDE_DRV_READY_NOTBUSY ; Wait for the device to be ready -.396d35 90 2b bcc $396d62 BCC ret_failure ; If an error occurred, return it -.396d37 e2 20 sep #$20 SEP #$20 ; set A short -.396d39 af 30 e8 af lda $afe830 LDA @l IDE_DATA ; Read and toss out one byte from the 8-bit interface -.396d3d a0 00 00 ldy #$0000 LDY #0 -.396d40 c2 20 rep #$20 REP #$20 ; set A long -.396d42 af 38 e8 af lda $afe838 read_loop LDA @l IDE_DATA_LO ; Get the word of data from the device -.396d46 97 06 sta [$0326],y STA [BIOS_BUFF_PTR],Y ; Save it to the buffer -.396d48 c8 iny INY ; Move to the next position -.396d49 c8 iny INY -.396d4a c0 00 02 cpy #$0200 CPY #512 -.396d4d d0 f3 bne $396d42 BNE read_loop -.396d4f ea nop NOP ; Wait about 500ns -.396d50 ea nop NOP -.396d51 ea nop NOP -.396d52 ea nop NOP -.396d53 ret_success -.396d53 e2 20 sep #$20 SEP #$20 ; set A short -.396d55 a9 00 lda #$00 LDA #0 -.396d57 85 00 sta $0320 STA BIOS_STATUS -.396d59 8d 06 03 sta $0306 STA @w FDC_ST0 -.396d5c 28 plp PLP ; Return success -.396d5d 2b pld PLD -.396d5e ab plb PLB -.396d5f 7a ply PLY -.396d60 38 sec SEC -.396d61 6b rtl RTL -.396d62 ret_failure -.396d62 e2 20 sep #$20 SEP #$20 ; set A short -.396d64 af 31 e8 af lda $afe831 LDA @l IDE_ERROR -.396d68 8d 06 03 sta $0306 STA @w FDC_ST0 -.396d6b a9 82 lda #$82 LDA #BIOS_ERR_READ -.396d6d 85 00 sta $0320 STA BIOS_STATUS -.396d6f 28 plp PLP -.396d70 2b pld PLD -.396d71 ab plb PLB -.396d72 7a ply PLY -.396d73 18 clc CLC -.396d74 6b rtl RTL -.396d75 IDE_PUTBLOCK -.396d75 5a phy PHY -.396d76 8b phb PHB -.396d77 0b phd PHD -.396d78 08 php PHP -.396d79 48 pha PHA ; begin setdbr macro -.396d7a 08 php PHP -.396d7b e2 20 sep #$20 SEP #$20 ; set A short -.396d7d a9 00 lda #$00 LDA #0 -.396d7f 48 pha PHA -.396d80 ab plb PLB -.396d81 28 plp PLP -.396d82 68 pla PLA ; end setdbr macro -.396d83 48 pha PHA ; begin setdp macro -.396d84 08 php PHP -.396d85 c2 20 rep #$20 REP #$20 ; set A long -.396d87 a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 -.396d8a 5b tcd TCD -.396d8b 28 plp PLP -.396d8c 68 pla PLA ; end setdp macro -.396d8d e2 20 sep #$20 SEP #$20 ; set A short -.396d8f 20 30 6c jsr $396c30 JSR IDE_DRV_READY_NOTBUSY ; Wait until the IDE is clear to accept commands -.396d92 a5 05 lda $0325 LDA BIOS_LBA+3 ; Get the high bits of the LBA -.396d94 29 07 and #$07 AND #$07 -.396d96 09 e0 ora #$e0 ORA #%11100000 ; Select DEV=0 and LBA mode = 1 -.396d98 8f 36 e8 af sta $afe836 STA @l IDE_HEAD ; Ensure master is selected -.396d9c 20 30 6c jsr $396c30 JSR IDE_DRV_READY_NOTBUSY ; And wait for it to take effect -.396d9f e2 20 sep #$20 SEP #$20 ; set A short -.396da1 a9 01 lda #$01 LDA #1 ; Set that we want one sector -.396da3 8f 32 e8 af sta $afe832 STA @l IDE_SECT_CNT -.396da7 a5 02 lda $0322 LDA BIOS_LBA ; Set the lower bits of the LBA -.396da9 8f 33 e8 af sta $afe833 STA @l IDE_SECT_SRT -.396dad a5 03 lda $0323 LDA BIOS_LBA+1 -.396daf 8f 34 e8 af sta $afe834 STA @l IDE_CLDR_LO -.396db3 a5 04 lda $0324 LDA BIOS_LBA+2 -.396db5 8f 35 e8 af sta $afe835 STA @l IDE_CLDR_HI -.396db9 a9 30 lda #$30 LDA #IDE_CMD_WRITE_SECTOR ; The READ SECTOR command -.396dbb 8f 37 e8 af sta $afe837 STA @l IDE_CMD_STAT -.396dbf ea nop NOP ; Wait about 500ns -.396dc0 ea nop NOP -.396dc1 ea nop NOP -.396dc2 ea nop NOP -.396dc3 20 30 6c jsr $396c30 JSR IDE_DRV_READY_NOTBUSY ; Wait for the device to be ready -.396dc6 90 33 bcc $396dfb BCC ret_failure ; If an error occurred, return it -.396dc8 c2 30 rep #$30 REP #$30 ; set A&X long -.396dca a0 00 00 ldy #$0000 LDY #0 -.396dcd b7 06 lda [$0326],y read_loop LDA [BIOS_BUFF_PTR],Y ; Get the word from the buffer -.396dcf 8f 38 e8 af sta $afe838 STA @l IDE_DATA_LO ; Save the word to the device -.396dd3 c8 iny INY ; Move to the next position -.396dd4 c8 iny INY -.396dd5 c0 00 02 cpy #$0200 CPY #512 -.396dd8 d0 f3 bne $396dcd BNE read_loop -.396dda ea nop NOP ; Wait about 500ns -.396ddb ea nop NOP -.396ddc ea nop NOP -.396ddd ea nop NOP -.396dde 20 30 6c jsr $396c30 JSR IDE_DRV_READY_NOTBUSY ; Wait for the device to be ready -.396de1 90 18 bcc $396dfb BCC ret_failure ; If an error occurred, return it -.396de3 af 37 e8 af lda $afe837 LDA @l IDE_CMD_STAT ; Check the status -.396de7 89 21 00 bit #$0021 BIT #IDE_STAT_ERR | IDE_STAT_DF -.396dea d0 0f bne $396dfb BNE ret_failure ; If error: return failure -.396dec ret_success -.396dec e2 20 sep #$20 SEP #$20 ; set A short -.396dee a9 00 lda #$00 LDA #0 -.396df0 85 00 sta $0320 STA BIOS_STATUS -.396df2 8d 06 03 sta $0306 STA @w FDC_ST0 -.396df5 28 plp PLP ; Return success -.396df6 2b pld PLD -.396df7 ab plb PLB -.396df8 7a ply PLY -.396df9 38 sec SEC -.396dfa 6b rtl RTL -.396dfb ret_failure -.396dfb e2 20 sep #$20 SEP #$20 ; set A short -.396dfd af 31 e8 af lda $afe831 LDA @l IDE_ERROR -.396e01 8d 06 03 sta $0306 STA @w FDC_ST0 -.396e04 a9 82 lda #$82 LDA #BIOS_ERR_READ -.396e06 85 00 sta $0320 STA BIOS_STATUS -.396e08 28 plp PLP -.396e09 2b pld PLD -.396e0a ab plb PLB -.396e0b 7a ply PLY -.396e0c 18 clc CLC -.396e0d 6b rtl RTL +.396b2d IDE_TEST +.396b2d 08 php PHP +.396b2e c2 20 rep #$20 REP #$20 ; set A long +.396b30 a9 00 a3 lda #$a300 LDA #<>DOS_SECTOR +.396b33 8f 26 03 00 sta $000326 STA @l BIOS_BUFF_PTR +.396b37 a9 38 00 lda #$0038 LDA #`DOS_SECTOR +.396b3a 8f 28 03 00 sta $000328 STA @l BIOS_BUFF_PTR+2 +.396b3e 22 5b 6c 39 jsl $396c5b JSL IDE_IDENTIFY +.396b42 b0 03 bcs $396b47 BCS id_ok +.396b44 82 ab 00 brl $396bf2 BRL done +.396b47 id_ok +.396b47 c2 10 rep #$10 REP #$10 ; set X long +.396b49 e2 20 sep #$20 SEP #$20 ; set A short +.396b4b a0 28 00 ldy #$0028 LDY #40 +.396b4e a2 36 00 ldx #$0036 LDX #27*2 +.396b51 bf 01 a3 38 lda $38a301,x pr_model LDA DOS_SECTOR+1,X +.396b55 22 18 10 00 jsl $001018 JSL PUTC +.396b59 bf 00 a3 38 lda $38a300,x LDA DOS_SECTOR,X +.396b5d 22 18 10 00 jsl $001018 JSL PUTC +.396b61 e8 inx INX +.396b62 e8 inx INX +.396b63 88 dey DEY +.396b64 88 dey DEY +.396b65 d0 ea bne $396b51 BNE pr_model +.396b67 c2 10 rep #$10 REP #$10 ; set X long +.396b69 e2 20 sep #$20 SEP #$20 ; set A short +.396b6b a0 14 00 ldy #$0014 LDY #20 +.396b6e a2 14 00 ldx #$0014 LDX #10*2 +.396b71 bf 01 a3 38 lda $38a301,x pr_serial LDA DOS_SECTOR+1,X +.396b75 22 18 10 00 jsl $001018 JSL PUTC +.396b79 bf 00 a3 38 lda $38a300,x LDA DOS_SECTOR,X +.396b7d 22 18 10 00 jsl $001018 JSL PUTC +.396b81 e8 inx INX +.396b82 e8 inx INX +.396b83 88 dey DEY +.396b84 88 dey DEY +.396b85 d0 ea bne $396b71 BNE pr_serial +.396b87 22 6c 10 00 jsl $00106c JSL PRINTCR +.396b8b c2 30 rep #$30 REP #$30 ; set A&X long +.396b8d a9 01 00 lda #$0001 LDA #1 ; Set LBA = 1 +.396b90 8f 22 03 00 sta $000322 STA @l BIOS_LBA +.396b94 a9 00 00 lda #$0000 LDA #0 +.396b97 8f 24 03 00 sta $000324 STA @l BIOS_LBA+2 +.396b9b a9 00 a3 lda #$a300 LDA #<>DOS_SECTOR +.396b9e 8f 26 03 00 sta $000326 STA @l BIOS_BUFF_PTR +.396ba2 a9 38 00 lda #$0038 LDA #`DOS_SECTOR +.396ba5 8f 28 03 00 sta $000328 STA @l BIOS_BUFF_PTR+2 +.396ba9 a2 00 00 ldx #$0000 LDX #0 ; Initialize the block to some recognizable data +.396bac a9 a5 5a lda #$5aa5 LDA #$5AA5 +.396baf 9f 00 a3 38 sta $38a300,x init_loop STA DOS_SECTOR,X +.396bb3 e8 inx INX +.396bb4 e8 inx INX +.396bb5 e0 00 02 cpx #$0200 CPX #512 +.396bb8 d0 f5 bne $396baf BNE init_loop +.396bba 22 7a 6d 39 jsl $396d7a JSL IDE_PUTBLOCK ; Attempt to write the block +.396bbe b0 06 bcs $396bc6 BCS read_sect1 +.396bc0 22 6c 10 00 jsl $00106c JSL PRINTCR +.396bc4 80 2c bra $396bf2 BRA done +.396bc6 a9 01 00 lda #$0001 read_sect1 LDA #1 ; Set LBA = 1 +.396bc9 8f 22 03 00 sta $000322 STA @l BIOS_LBA +.396bcd a9 00 00 lda #$0000 LDA #0 +.396bd0 8f 24 03 00 sta $000324 STA @l BIOS_LBA+2 +.396bd4 a9 00 a5 lda #$a500 LDA #<>DOS_FAT_SECTORS +.396bd7 8f 26 03 00 sta $000326 STA @l BIOS_BUFF_PTR +.396bdb a9 38 00 lda #$0038 LDA #`DOS_FAT_SECTORS +.396bde 8f 28 03 00 sta $000328 STA @l BIOS_BUFF_PTR+2 +.396be2 22 e9 6c 39 jsl $396ce9 JSL IDE_GETBLOCK ; Attempt to read the block +.396be6 b0 06 bcs $396bee BCS all_ok +.396be8 22 6c 10 00 jsl $00106c JSL PRINTCR +.396bec 80 04 bra $396bf2 BRA done +.396bee all_ok +.396bee 22 6c 10 00 jsl $00106c JSL PRINTCR +.396bf2 28 plp done PLP +.396bf3 6b rtl RTL +.396bf4 IDE_INIT +.396bf4 e2 20 sep #$20 SEP #$20 ; set A short +.396bf6 20 17 6c jsr $396c17 JSR IDE_DRIVE_BSY ; Check to see if drive is busy +.396bf9 a9 00 lda #$00 LDA #$00 +.396bfb 8f 35 e8 af sta $afe835 STA IDE_CLDR_HI +.396bff 8f 34 e8 af sta $afe834 STA IDE_CLDR_LO +.396c03 8f 32 e8 af sta $afe832 STA IDE_SECT_CNT +.396c07 a9 01 lda #$01 LDA #$01 +.396c09 8f 33 e8 af sta $afe833 STA IDE_SECT_SRT +.396c0d a9 a0 lda #$a0 LDA #$A0 ; HEAD 0 - Select Master Drive +.396c0f 8f 36 e8 af sta $afe836 STA IDE_HEAD +.396c13 20 35 6c jsr $396c35 JSR IDE_DRV_READY_NOTBUSY +.396c16 6b rtl RTL +.396c17 IDE_DRIVE_BSY +.396c17 08 php PHP +.396c18 e2 20 sep #$20 SEP #$20 ; set A short +.396c1a af 37 e8 af lda $afe837 loop LDA @l IDE_CMD_STAT +.396c1e 29 80 and #$80 AND #IDE_STAT_BSY ; Check for RDY Bit, this needs to be 1'b1 +.396c20 c9 80 cmp #$80 CMP #IDE_STAT_BSY ; If not go read again +.396c22 f0 f6 beq $396c1a BEQ loop +.396c24 28 plp PLP +.396c25 60 rts RTS +.396c26 IDE_DRIVE_READY +.396c26 08 php PHP +.396c27 e2 20 sep #$20 SEP #$20 ; set A short +.396c29 af 37 e8 af lda $afe837 loop LDA @l IDE_CMD_STAT +.396c2d 29 40 and #$40 AND #IDE_STAT_DRDY ; Check to see if the Busy Signal is Cleared +.396c2f c9 40 cmp #$40 CMP #IDE_STAT_DRDY ; if it is still one, then go back to read again. +.396c31 d0 f6 bne $396c29 BNE loop +.396c33 28 plp PLP +.396c34 60 rts RTS +.396c35 IDE_DRV_READY_NOTBUSY +.396c35 08 php PHP +.396c36 e2 20 sep #$20 SEP #$20 ; set A short +.396c38 af 37 e8 af lda $afe837 loop LDA @l IDE_CMD_STAT ; Check the status +.396c3c 29 c0 and #$c0 AND #IDE_STAT_BSY | IDE_STAT_DRDY +.396c3e c9 40 cmp #$40 CMP #IDE_STAT_DRDY ; Is it READY but not BUSY? +.396c40 d0 f6 bne $396c38 BNE loop ; No: keep waiting +.396c42 28 plp ret_success PLP ; Return success +.396c43 38 sec SEC +.396c44 60 rts RTS +.396c45 8f 07 03 00 sta $000307 ret_failure STA @l FDC_ST1 ; Save the status code to FDC_ST1 +.396c49 28 plp PLP ; Return failure +.396c4a 18 clc CLC +.396c4b 60 rts RTS +.396c4c IDE_NOT_DRQ +.396c4c 08 php PHP +.396c4d e2 20 sep #$20 SEP #$20 ; set A short +.396c4f af 37 e8 af lda $afe837 loop LDA @l IDE_CMD_STAT ; Get the status +.396c53 29 08 and #$08 AND #IDE_STAT_DRQ +.396c55 c9 08 cmp #$08 CMP #IDE_STAT_DRQ ; Is the DRQ bit set? +.396c57 d0 f6 bne $396c4f BNE loop ; No: keep waiting +.396c59 28 plp PLP +.396c5a 60 rts RTS +.396c5b IDE_IDENTIFY +.396c5b 5a phy PHY +.396c5c 8b phb PHB +.396c5d 0b phd PHD +.396c5e 08 php PHP +.396c5f 48 pha PHA ; begin setdbr macro +.396c60 08 php PHP +.396c61 e2 20 sep #$20 SEP #$20 ; set A short +.396c63 a9 00 lda #$00 LDA #0 +.396c65 48 pha PHA +.396c66 ab plb PLB +.396c67 28 plp PLP +.396c68 68 pla PLA ; end setdbr macro +.396c69 48 pha PHA ; begin setdp macro +.396c6a 08 php PHP +.396c6b c2 20 rep #$20 REP #$20 ; set A long +.396c6d a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.396c70 5b tcd TCD +.396c71 28 plp PLP +.396c72 68 pla PLA ; end setdp macro +.396c73 e2 20 sep #$20 SEP #$20 ; set A short +.396c75 20 35 6c jsr $396c35 JSR IDE_DRV_READY_NOTBUSY ; Wait until the IDE is clear to accept commands +.396c78 a5 05 lda $0325 LDA BIOS_LBA+3 ; Get the high bits of the LBA +.396c7a 29 07 and #$07 AND #$07 +.396c7c 09 a0 ora #$a0 ORA #%10100000 ; Select DEV=0 and LBA mode = 1 +.396c7e 8f 36 e8 af sta $afe836 STA @l IDE_HEAD ; Ensure master is selected +.396c82 20 35 6c jsr $396c35 JSR IDE_DRV_READY_NOTBUSY ; And wait for it to take effect +.396c85 e2 20 sep #$20 SEP #$20 ; set A short +.396c87 a9 00 lda #$00 LDA #0 ; Clear sector count and LBA +.396c89 8f 32 e8 af sta $afe832 STA @l IDE_SECT_CNT +.396c8d 8f 33 e8 af sta $afe833 STA @l IDE_SECT_SRT +.396c91 8f 34 e8 af sta $afe834 STA @l IDE_CLDR_LO +.396c95 8f 35 e8 af sta $afe835 STA @l IDE_CLDR_HI +.396c99 a9 ec lda #$ec LDA #IDE_CMD_IDENTIFY ; The IDENTIFY command +.396c9b 8f 37 e8 af sta $afe837 STA @l IDE_CMD_STAT ; Check the status +.396c9f f0 29 beq $396cca BEQ no_media ; If 0: there is no drive +.396ca1 20 17 6c jsr $396c17 JSR IDE_DRIVE_BSY ; Othewise: wait for drive to not be busy +.396ca4 20 35 6c jsr $396c35 JSR IDE_DRV_READY_NOTBUSY ; Wait for the device to be ready +.396ca7 90 2d bcc $396cd6 BCC ret_failure ; If an error occurred, return it +.396ca9 c2 30 rep #$30 REP #$30 ; set A&X long +.396cab a0 00 00 ldy #$0000 LDY #0 +.396cae af 38 e8 af lda $afe838 read_loop LDA @l IDE_DATA_LO ; Get the word of data from the device +.396cb2 97 06 sta [$0326],y STA [BIOS_BUFF_PTR],Y ; Save it to the buffer +.396cb4 c8 iny INY ; Move to the next position +.396cb5 c8 iny INY +.396cb6 c0 00 02 cpy #$0200 CPY #512 +.396cb9 d0 f3 bne $396cae BNE read_loop +.396cbb ret_success +.396cbb e2 20 sep #$20 SEP #$20 ; set A short +.396cbd a9 00 lda #$00 LDA #0 +.396cbf 85 00 sta $0320 STA BIOS_STATUS +.396cc1 8d 06 03 sta $0306 STA @w FDC_ST0 +.396cc4 28 plp PLP ; Return success +.396cc5 2b pld PLD +.396cc6 ab plb PLB +.396cc7 7a ply PLY +.396cc8 38 sec SEC +.396cc9 6b rtl RTL +.396cca no_media +.396cca e2 20 sep #$20 SEP #$20 ; set A short +.396ccc a9 87 lda #$87 LDA #BIOS_ERR_NOMEDIA +.396cce 80 0a bra $396cda BRA pass_failure +.396cd0 not_ata +.396cd0 e2 20 sep #$20 SEP #$20 ; set A short +.396cd2 a9 8a lda #$8a LDA #BIOS_ERR_NOTATA +.396cd4 80 04 bra $396cda BRA pass_failure +.396cd6 ret_failure +.396cd6 e2 20 sep #$20 SEP #$20 ; set A short +.396cd8 a9 82 lda #$82 LDA #BIOS_ERR_READ +.396cda 85 00 sta $0320 pass_failure STA BIOS_STATUS +.396cdc af 31 e8 af lda $afe831 LDA @l IDE_ERROR +.396ce0 8d 06 03 sta $0306 STA @w FDC_ST0 +.396ce3 28 plp PLP +.396ce4 2b pld PLD +.396ce5 ab plb PLB +.396ce6 7a ply PLY +.396ce7 18 clc CLC +.396ce8 6b rtl RTL +.396ce9 IDE_GETBLOCK +.396ce9 5a phy PHY +.396cea 8b phb PHB +.396ceb 0b phd PHD +.396cec 08 php PHP +.396ced 48 pha PHA ; begin setdbr macro +.396cee 08 php PHP +.396cef e2 20 sep #$20 SEP #$20 ; set A short +.396cf1 a9 00 lda #$00 LDA #0 +.396cf3 48 pha PHA +.396cf4 ab plb PLB +.396cf5 28 plp PLP +.396cf6 68 pla PLA ; end setdbr macro +.396cf7 48 pha PHA ; begin setdp macro +.396cf8 08 php PHP +.396cf9 c2 20 rep #$20 REP #$20 ; set A long +.396cfb a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.396cfe 5b tcd TCD +.396cff 28 plp PLP +.396d00 68 pla PLA ; end setdp macro +.396d01 e2 20 sep #$20 SEP #$20 ; set A short +.396d03 20 35 6c jsr $396c35 JSR IDE_DRV_READY_NOTBUSY ; Wait until the IDE is clear to accept commands +.396d06 a5 05 lda $0325 LDA BIOS_LBA+3 ; Get the high bits of the LBA +.396d08 29 07 and #$07 AND #$07 +.396d0a 09 e0 ora #$e0 ORA #%11100000 ; Select DEV=0 and LBA mode = 1 +.396d0c 8f 36 e8 af sta $afe836 STA @l IDE_HEAD ; Ensure master is selected +.396d10 20 35 6c jsr $396c35 JSR IDE_DRV_READY_NOTBUSY ; And wait for it to take effect +.396d13 e2 20 sep #$20 SEP #$20 ; set A short +.396d15 a9 01 lda #$01 LDA #1 ; Set that we want one sector +.396d17 8f 32 e8 af sta $afe832 STA @l IDE_SECT_CNT +.396d1b a5 02 lda $0322 LDA BIOS_LBA ; Set the lower bits of the LBA +.396d1d 8f 33 e8 af sta $afe833 STA @l IDE_SECT_SRT +.396d21 a5 03 lda $0323 LDA BIOS_LBA+1 +.396d23 8f 34 e8 af sta $afe834 STA @l IDE_CLDR_LO +.396d27 a5 04 lda $0324 LDA BIOS_LBA+2 +.396d29 8f 35 e8 af sta $afe835 STA @l IDE_CLDR_HI +.396d2d a9 21 lda #$21 LDA #IDE_CMD_READ_SECTOR ; The READ SECTOR command +.396d2f 8f 37 e8 af sta $afe837 STA @l IDE_CMD_STAT +.396d33 ea nop NOP ; Wait about 500ns +.396d34 ea nop NOP +.396d35 ea nop NOP +.396d36 ea nop NOP +.396d37 20 35 6c jsr $396c35 JSR IDE_DRV_READY_NOTBUSY ; Wait for the device to be ready +.396d3a 90 2b bcc $396d67 BCC ret_failure ; If an error occurred, return it +.396d3c e2 20 sep #$20 SEP #$20 ; set A short +.396d3e af 30 e8 af lda $afe830 LDA @l IDE_DATA ; Read and toss out one byte from the 8-bit interface +.396d42 a0 00 00 ldy #$0000 LDY #0 +.396d45 c2 20 rep #$20 REP #$20 ; set A long +.396d47 af 38 e8 af lda $afe838 read_loop LDA @l IDE_DATA_LO ; Get the word of data from the device +.396d4b 97 06 sta [$0326],y STA [BIOS_BUFF_PTR],Y ; Save it to the buffer +.396d4d c8 iny INY ; Move to the next position +.396d4e c8 iny INY +.396d4f c0 00 02 cpy #$0200 CPY #512 +.396d52 d0 f3 bne $396d47 BNE read_loop +.396d54 ea nop NOP ; Wait about 500ns +.396d55 ea nop NOP +.396d56 ea nop NOP +.396d57 ea nop NOP +.396d58 ret_success +.396d58 e2 20 sep #$20 SEP #$20 ; set A short +.396d5a a9 00 lda #$00 LDA #0 +.396d5c 85 00 sta $0320 STA BIOS_STATUS +.396d5e 8d 06 03 sta $0306 STA @w FDC_ST0 +.396d61 28 plp PLP ; Return success +.396d62 2b pld PLD +.396d63 ab plb PLB +.396d64 7a ply PLY +.396d65 38 sec SEC +.396d66 6b rtl RTL +.396d67 ret_failure +.396d67 e2 20 sep #$20 SEP #$20 ; set A short +.396d69 af 31 e8 af lda $afe831 LDA @l IDE_ERROR +.396d6d 8d 06 03 sta $0306 STA @w FDC_ST0 +.396d70 a9 82 lda #$82 LDA #BIOS_ERR_READ +.396d72 85 00 sta $0320 STA BIOS_STATUS +.396d74 28 plp PLP +.396d75 2b pld PLD +.396d76 ab plb PLB +.396d77 7a ply PLY +.396d78 18 clc CLC +.396d79 6b rtl RTL +.396d7a IDE_PUTBLOCK +.396d7a 5a phy PHY +.396d7b 8b phb PHB +.396d7c 0b phd PHD +.396d7d 08 php PHP +.396d7e 48 pha PHA ; begin setdbr macro +.396d7f 08 php PHP +.396d80 e2 20 sep #$20 SEP #$20 ; set A short +.396d82 a9 00 lda #$00 LDA #0 +.396d84 48 pha PHA +.396d85 ab plb PLB +.396d86 28 plp PLP +.396d87 68 pla PLA ; end setdbr macro +.396d88 48 pha PHA ; begin setdp macro +.396d89 08 php PHP +.396d8a c2 20 rep #$20 REP #$20 ; set A long +.396d8c a9 20 03 lda #$0320 LDA #SDOS_VARIABLES ; set DP to page 0 +.396d8f 5b tcd TCD +.396d90 28 plp PLP +.396d91 68 pla PLA ; end setdp macro +.396d92 e2 20 sep #$20 SEP #$20 ; set A short +.396d94 20 35 6c jsr $396c35 JSR IDE_DRV_READY_NOTBUSY ; Wait until the IDE is clear to accept commands +.396d97 a5 05 lda $0325 LDA BIOS_LBA+3 ; Get the high bits of the LBA +.396d99 29 07 and #$07 AND #$07 +.396d9b 09 e0 ora #$e0 ORA #%11100000 ; Select DEV=0 and LBA mode = 1 +.396d9d 8f 36 e8 af sta $afe836 STA @l IDE_HEAD ; Ensure master is selected +.396da1 20 35 6c jsr $396c35 JSR IDE_DRV_READY_NOTBUSY ; And wait for it to take effect +.396da4 e2 20 sep #$20 SEP #$20 ; set A short +.396da6 a9 01 lda #$01 LDA #1 ; Set that we want one sector +.396da8 8f 32 e8 af sta $afe832 STA @l IDE_SECT_CNT +.396dac a5 02 lda $0322 LDA BIOS_LBA ; Set the lower bits of the LBA +.396dae 8f 33 e8 af sta $afe833 STA @l IDE_SECT_SRT +.396db2 a5 03 lda $0323 LDA BIOS_LBA+1 +.396db4 8f 34 e8 af sta $afe834 STA @l IDE_CLDR_LO +.396db8 a5 04 lda $0324 LDA BIOS_LBA+2 +.396dba 8f 35 e8 af sta $afe835 STA @l IDE_CLDR_HI +.396dbe a9 30 lda #$30 LDA #IDE_CMD_WRITE_SECTOR ; The READ SECTOR command +.396dc0 8f 37 e8 af sta $afe837 STA @l IDE_CMD_STAT +.396dc4 ea nop NOP ; Wait about 500ns +.396dc5 ea nop NOP +.396dc6 ea nop NOP +.396dc7 ea nop NOP +.396dc8 20 35 6c jsr $396c35 JSR IDE_DRV_READY_NOTBUSY ; Wait for the device to be ready +.396dcb 90 33 bcc $396e00 BCC ret_failure ; If an error occurred, return it +.396dcd c2 30 rep #$30 REP #$30 ; set A&X long +.396dcf a0 00 00 ldy #$0000 LDY #0 +.396dd2 b7 06 lda [$0326],y read_loop LDA [BIOS_BUFF_PTR],Y ; Get the word from the buffer +.396dd4 8f 38 e8 af sta $afe838 STA @l IDE_DATA_LO ; Save the word to the device +.396dd8 c8 iny INY ; Move to the next position +.396dd9 c8 iny INY +.396dda c0 00 02 cpy #$0200 CPY #512 +.396ddd d0 f3 bne $396dd2 BNE read_loop +.396ddf ea nop NOP ; Wait about 500ns +.396de0 ea nop NOP +.396de1 ea nop NOP +.396de2 ea nop NOP +.396de3 20 35 6c jsr $396c35 JSR IDE_DRV_READY_NOTBUSY ; Wait for the device to be ready +.396de6 90 18 bcc $396e00 BCC ret_failure ; If an error occurred, return it +.396de8 af 37 e8 af lda $afe837 LDA @l IDE_CMD_STAT ; Check the status +.396dec 89 21 00 bit #$0021 BIT #IDE_STAT_ERR | IDE_STAT_DF +.396def d0 0f bne $396e00 BNE ret_failure ; If error: return failure +.396df1 ret_success +.396df1 e2 20 sep #$20 SEP #$20 ; set A short +.396df3 a9 00 lda #$00 LDA #0 +.396df5 85 00 sta $0320 STA BIOS_STATUS +.396df7 8d 06 03 sta $0306 STA @w FDC_ST0 +.396dfa 28 plp PLP ; Return success +.396dfb 2b pld PLD +.396dfc ab plb PLB +.396dfd 7a ply PLY +.396dfe 38 sec SEC +.396dff 6b rtl RTL +.396e00 ret_failure +.396e00 e2 20 sep #$20 SEP #$20 ; set A short +.396e02 af 31 e8 af lda $afe831 LDA @l IDE_ERROR +.396e06 8d 06 03 sta $0306 STA @w FDC_ST0 +.396e09 a9 82 lda #$82 LDA #BIOS_ERR_READ +.396e0b 85 00 sta $0320 STA BIOS_STATUS +.396e0d 28 plp PLP +.396e0e 2b pld PLD +.396e0f ab plb PLB +.396e10 7a ply PLY +.396e11 18 clc CLC +.396e12 6b rtl RTL ;****** Return to file: src\kernel.asm -.396e0e KERNEL_DATA ->396e0e 20 20 20 20 0b 0c 0b 0c greet_msg .text $20, $20, $20, $20, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, " FFFFFFF MMMMMMMM XX XXX " ,$0D ->396e16 0b 0c 0b 0c 0b 0c 20 46 46 46 46 46 46 46 20 4d ->396e26 4d 4d 4d 4d 4d 4d 4d 20 58 58 20 20 20 20 58 58 ->396e36 58 20 0d ->396e39 20 20 20 0b 0c 0b 0c 0b .text $20, $20, $20, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $20, "FF MM MM MM XX XXX ",$0D ->396e41 0c 0b 0c 0b 0c 20 46 46 20 20 20 20 20 20 4d 4d ->396e51 20 4d 4d 20 4d 4d 20 20 20 58 58 20 58 58 58 20 ->396e61 20 20 0d ->396e64 20 20 0b 0c 0b 0c 0b 0c .text $20, $20, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $20, "FFFFF MM MM MM XXX ",$0D ->396e6c 0b 0c 0b 0c 20 46 46 46 46 46 20 20 20 4d 4d 20 ->396e7c 4d 4d 20 4d 4d 20 20 20 20 58 58 58 20 20 20 20 ->396e8c 20 20 0d ->396e8f 20 0b 0c 0b 0c 0b 0c 0b .text $20, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $20, "FF MM MM MM XXX XX ",$0D ->396e97 0c 0b 0c 20 46 46 20 20 20 20 20 20 4d 4d 20 4d ->396ea7 4d 20 4d 4d 20 20 58 58 58 20 20 58 58 20 20 20 ->396eb7 20 20 0d ->396eba 0b 0c 0b 0c 0b 0c 0b 0c .text $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $20, "FF MM MM MM XXX XX ",$0D ->396ec2 0b 0c 20 46 46 20 20 20 20 20 20 4d 4d 20 4d 4d ->396ed2 20 4d 4d 20 58 58 58 20 20 20 20 20 58 58 20 20 ->396ee2 20 20 0d ->396ee5 0d 43 32 35 36 20 46 4f .text $0D, "C256 FOENIX FMX -- 3,670,016 Bytes Free", $0D ->396eed 45 4e 49 58 20 46 4d 58 20 2d 2d 20 33 2c 36 37 ->396efd 30 2c 30 31 36 20 42 79 74 65 73 20 46 72 65 65 ->396f0d 0d ->396f0e 77 77 77 2e 63 32 35 36 .text "www.c256foenix.com - Kernel version: " ->396f16 66 6f 65 6e 69 78 2e 63 6f 6d 20 2d 20 4b 65 72 ->396f26 6e 65 6c 20 76 65 72 73 69 6f 6e 3a 20 +.396e13 KERNEL_DATA +>396e13 20 20 20 20 0b 0c 0b 0c greet_msg .text $20, $20, $20, $20, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, " FFFFFFF MMMMMMMM XX XXX " ,$0D +>396e1b 0b 0c 0b 0c 0b 0c 20 46 46 46 46 46 46 46 20 4d +>396e2b 4d 4d 4d 4d 4d 4d 4d 20 58 58 20 20 20 20 58 58 +>396e3b 58 20 0d +>396e3e 20 20 20 0b 0c 0b 0c 0b .text $20, $20, $20, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $20, "FF MM MM MM XX XXX ",$0D +>396e46 0c 0b 0c 0b 0c 20 46 46 20 20 20 20 20 20 4d 4d +>396e56 20 4d 4d 20 4d 4d 20 20 20 58 58 20 58 58 58 20 +>396e66 20 20 0d +>396e69 20 20 0b 0c 0b 0c 0b 0c .text $20, $20, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $20, "FFFFF MM MM MM XXX ",$0D +>396e71 0b 0c 0b 0c 20 46 46 46 46 46 20 20 20 4d 4d 20 +>396e81 4d 4d 20 4d 4d 20 20 20 20 58 58 58 20 20 20 20 +>396e91 20 20 0d +>396e94 20 0b 0c 0b 0c 0b 0c 0b .text $20, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $20, "FF MM MM MM XXX XX ",$0D +>396e9c 0c 0b 0c 20 46 46 20 20 20 20 20 20 4d 4d 20 4d +>396eac 4d 20 4d 4d 20 20 58 58 58 20 20 58 58 20 20 20 +>396ebc 20 20 0d +>396ebf 0b 0c 0b 0c 0b 0c 0b 0c .text $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $0B, $0C, $20, "FF MM MM MM XXX XX ",$0D +>396ec7 0b 0c 20 46 46 20 20 20 20 20 20 4d 4d 20 4d 4d +>396ed7 20 4d 4d 20 58 58 58 20 20 20 20 20 58 58 20 20 +>396ee7 20 20 0d +>396eea 0d 43 32 35 36 20 46 4f .text $0D, "C256 FOENIX FMX -- 3,670,016 Bytes Free", $0D +>396ef2 45 4e 49 58 20 46 4d 58 20 2d 2d 20 33 2c 36 37 +>396f02 30 2c 30 31 36 20 42 79 74 65 73 20 46 72 65 65 +>396f12 0d +>396f13 77 77 77 2e 63 32 35 36 .text "www.c256foenix.com - Kernel version: " +>396f1b 66 6f 65 6e 69 78 2e 63 6f 6d 20 2d 20 4b 65 72 +>396f2b 6e 65 6c 20 76 65 72 73 69 6f 6e 3a 20 ;****** Processing file: src\version.asm ->396f33 76 30 2e 31 2e 30 2d 61 .text "v0.1.0-alpha+1010 (2020-09-30)" ->396f3b 6c 70 68 61 2b 31 30 31 30 20 28 32 30 32 30 2d ->396f4b 30 39 2d 33 30 29 +>396f38 76 30 2e 31 2e 30 2d 61 .text "v0.1.0-alpha+1011 (2020-12-31)" +>396f40 6c 70 68 61 2b 31 30 31 31 20 28 32 30 32 30 2d +>396f50 31 32 2d 33 31 29 ;****** Return to file: src\kernel.asm ->396f51 0d 00 .text $0D,$00 -.396f53 old_pc_style_stat ->396f53 1d 1d 1d 1d 1d 1d 8d 8d greet_clr_line1 .text $1D, $1D, $1D, $1D, $1D, $1D, $8D, $8D, $4D, $4D, $2D, $2D, $5D, $5D, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD ->396f5b 4d 4d 2d 2d 5d 5d fd fd fd fd fd fd fd fd fd fd ->396f6b fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd ->396f7b fd fd ->396f7d 1d 1d 1d 1d 1d 8d 8d 4d greet_clr_line2 .text $1D, $1D, $1D, $1D, $1D, $8D, $8D, $4D, $4D, $2D, $2D, $5D, $5D, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD ->396f85 4d 2d 2d 5d 5d fd fd fd fd fd fd fd fd fd fd fd ->396f95 fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd ->396fa5 fd fd ->396fa7 1d 1d 1d 1d 8d 8d 4d 4d greet_clr_line3 .text $1D, $1D, $1D, $1D, $8D, $8D, $4D, $4D, $2D, $2D, $5D, $5D, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD ->396faf 2d 2d 5d 5d fd fd fd fd fd fd fd fd fd fd fd fd ->396fbf fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd ->396fcf fd fd ->396fd1 1d 1d 1d 8d 8d 4d 4d 2d greet_clr_line4 .text $1D, $1D, $1D, $8D, $8D, $4D, $4D, $2D, $2D, $5D, $5D, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD ->396fd9 2d 5d 5d fd fd fd fd fd fd fd fd fd fd fd fd fd ->396fe9 fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd ->396ff9 fd fd ->396ffb 1d 1d 8d 8d 4d 4d 2d 2d greet_clr_line5 .text $1D, $1D, $8D, $8D, $4D, $4D, $2D, $2D, $5D, $5D, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD ->397003 5d 5d fd fd fd fd fd fd fd fd fd fd fd fd fd fd ->397013 fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd ->397023 fd fd ->397025 00 00 00 ff fg_color_lut .text $00, $00, $00, $FF ->397029 00 00 80 ff .text $00, $00, $80, $FF ->39702d 00 80 00 ff .text $00, $80, $00, $FF ->397031 80 00 00 ff .text $80, $00, $00, $FF ->397035 00 80 80 ff .text $00, $80, $80, $FF ->397039 80 80 00 ff .text $80, $80, $00, $FF ->39703d 80 00 80 ff .text $80, $00, $80, $FF ->397041 80 80 80 ff .text $80, $80, $80, $FF ->397045 00 45 ff ff .text $00, $45, $FF, $FF ->397049 13 45 8b ff .text $13, $45, $8B, $FF ->39704d 00 00 20 ff .text $00, $00, $20, $FF ->397051 00 20 00 ff .text $00, $20, $00, $FF ->397055 20 00 00 ff .text $20, $00, $00, $FF ->397059 20 20 20 ff .text $20, $20, $20, $FF ->39705d 40 40 40 ff .text $40, $40, $40, $FF ->397061 ff ff ff ff .text $FF, $FF, $FF, $FF ->397065 00 00 00 ff bg_color_lut .text $00, $00, $00, $FF ->397069 00 00 80 ff .text $00, $00, $80, $FF ->39706d 00 80 00 ff .text $00, $80, $00, $FF ->397071 80 00 00 ff .text $80, $00, $00, $FF ->397075 00 20 20 ff .text $00, $20, $20, $FF ->397079 20 20 00 ff .text $20, $20, $00, $FF ->39707d 20 00 20 ff .text $20, $00, $20, $FF ->397081 20 20 20 ff .text $20, $20, $20, $FF ->397085 1e 69 d2 ff .text $1E, $69, $D2, $FF ->397089 13 45 8b ff .text $13, $45, $8B, $FF ->39708d 00 00 20 ff .text $00, $00, $20, $FF ->397091 00 20 00 ff .text $00, $20, $00, $FF ->397095 40 00 00 ff .text $40, $00, $00, $FF ->397099 10 10 10 ff .text $10, $10, $10, $FF ->39709d 40 40 40 ff .text $40, $40, $40, $FF ->3970a1 ff ff ff ff .text $FF, $FF, $FF, $FF ->3970a5 43 6d 64 20 30 78 41 41 pass_tst0xAAmsg .text "Cmd 0xAA Test passed...", $0D, $00 ->3970ad 20 54 65 73 74 20 70 61 73 73 65 64 2e 2e 2e 0d ->3970bd 00 ->3970be 43 6d 64 20 30 78 41 42 pass_tst0xABmsg .text "Cmd 0xAB Test passed...", $0D, $00 ->3970c6 20 54 65 73 74 20 70 61 73 73 65 64 2e 2e 2e 0d ->3970d6 00 ->3970d7 43 6d 64 20 30 78 36 30 pass_cmd0x60msg .text "Cmd 0x60 Executed.", $0D, $00 ->3970df 20 45 78 65 63 75 74 65 64 2e 0d 00 ->3970eb 43 6d 64 20 30 78 46 46 pass_cmd0xFFmsg .text "Cmd 0xFF (Reset) Done.", $0D, $00 ->3970f3 20 28 52 65 73 65 74 29 20 44 6f 6e 65 2e 0d 00 ->397103 43 6d 64 20 30 78 45 45 pass_cmd0xEEmsg .text "Cmd 0xEE Echo Test passed...", $0D, $00 ->39710b 20 45 63 68 6f 20 54 65 73 74 20 70 61 73 73 65 ->39711b 64 2e 2e 2e 0d 00 ->397121 4b 65 79 62 6f 61 72 64 Success_kb_init .text "Keyboard Present", $0D, $00 ->397129 20 50 72 65 73 65 6e 74 0d 00 ->397133 4e 6f 20 4b 65 79 62 6f Failed_kb_init .text "No Keyboard Attached or Failed Init...", $0D, $00 ->39713b 61 72 64 20 41 74 74 61 63 68 65 64 20 6f 72 20 ->39714b 46 61 69 6c 65 64 20 49 6e 69 74 2e 2e 2e 0d 00 ->39715b 4e 4f 20 53 49 47 4e 41 bmp_parser_err0 .text "NO SIGNATURE FOUND.", $00 ->397163 54 55 52 45 20 46 4f 55 4e 44 2e 00 ->39716f 42 4d 50 20 4c 4f 41 44 bmp_parser_msg0 .text "BMP LOADED.", $00 ->397177 45 44 2e 00 ->39717b 45 58 45 43 55 54 49 4e bmp_parser_msg1 .text "EXECUTING BMP PARSER", $00 ->397183 47 20 42 4d 50 20 50 41 52 53 45 52 00 ->397190 49 44 45 20 48 44 44 20 IDE_HDD_Present_msg0 .text "IDE HDD Present:", $00 ->397198 50 72 65 73 65 6e 74 3a 00 ->3971a1 42 6f 6f 74 20 44 49 50 boot_invalid .null "Boot DIP switch settings are invalid." ->3971a9 20 73 77 69 74 63 68 20 73 65 74 74 69 6e 67 73 ->3971b9 20 61 72 65 20 69 6e 76 61 6c 69 64 2e 00 ->3971c7 50 72 65 73 73 20 52 20 boot_retry .null "Press R to retry, B to go to BASIC.", 13 ->3971cf 74 6f 20 72 65 74 72 79 2c 20 42 20 74 6f 20 67 ->3971df 6f 20 74 6f 20 42 41 53 49 43 2e 0d 00 ->3971ec 55 6e 61 62 6c 65 20 74 sdc_err_boot .null "Unable to read the SD card." ->3971f4 6f 20 72 65 61 64 20 74 68 65 20 53 44 20 63 61 ->397204 72 64 2e 00 ->397208 55 6e 61 62 6c 65 20 74 ide_err_boot .null "Unable to read from the IDE drive." ->397210 6f 20 72 65 61 64 20 66 72 6f 6d 20 74 68 65 20 ->397220 49 44 45 20 64 72 69 76 65 2e 00 ->39722b 55 6e 61 62 6c 65 20 74 fdc_err_boot .null "Unable to read from the floppy drive." ->397233 6f 20 72 65 61 64 20 66 72 6f 6d 20 74 68 65 20 ->397243 66 6c 6f 70 70 79 20 64 72 69 76 65 2e 00 ->397251 42 6f 6f 74 69 6e 67 20 fdc_boot .null "Booting from floppy..." ->397259 66 72 6f 6d 20 66 6c 6f 70 70 79 2e 2e 2e 00 ->397268 0d 52 45 41 44 59 2e 00 ready_msg .null $0D,"READY." ->397270 41 42 4f 52 54 20 45 52 error_01 .null "ABORT ERROR" ->397278 52 4f 52 00 ->39727c 30 31 32 33 34 35 36 37 hex_digits .text "0123456789ABCDEF",0 ->397284 38 39 41 42 43 44 45 46 00 ->39728d .align 256 +>396f56 0d 00 .text $0D,$00 +.396f58 old_pc_style_stat +>396f58 1d 1d 1d 1d 1d 1d 8d 8d greet_clr_line1 .text $1D, $1D, $1D, $1D, $1D, $1D, $8D, $8D, $4D, $4D, $2D, $2D, $5D, $5D, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD +>396f60 4d 4d 2d 2d 5d 5d fd fd fd fd fd fd fd fd fd fd +>396f70 fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd +>396f80 fd fd +>396f82 1d 1d 1d 1d 1d 8d 8d 4d greet_clr_line2 .text $1D, $1D, $1D, $1D, $1D, $8D, $8D, $4D, $4D, $2D, $2D, $5D, $5D, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD +>396f8a 4d 2d 2d 5d 5d fd fd fd fd fd fd fd fd fd fd fd +>396f9a fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd +>396faa fd fd +>396fac 1d 1d 1d 1d 8d 8d 4d 4d greet_clr_line3 .text $1D, $1D, $1D, $1D, $8D, $8D, $4D, $4D, $2D, $2D, $5D, $5D, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD +>396fb4 2d 2d 5d 5d fd fd fd fd fd fd fd fd fd fd fd fd +>396fc4 fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd +>396fd4 fd fd +>396fd6 1d 1d 1d 8d 8d 4d 4d 2d greet_clr_line4 .text $1D, $1D, $1D, $8D, $8D, $4D, $4D, $2D, $2D, $5D, $5D, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD +>396fde 2d 5d 5d fd fd fd fd fd fd fd fd fd fd fd fd fd +>396fee fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd +>396ffe fd fd +>397000 1d 1d 8d 8d 4d 4d 2d 2d greet_clr_line5 .text $1D, $1D, $8D, $8D, $4D, $4D, $2D, $2D, $5D, $5D, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD, $FD +>397008 5d 5d fd fd fd fd fd fd fd fd fd fd fd fd fd fd +>397018 fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd +>397028 fd fd +>39702a 00 00 00 ff fg_color_lut .text $00, $00, $00, $FF +>39702e 00 00 80 ff .text $00, $00, $80, $FF +>397032 00 80 00 ff .text $00, $80, $00, $FF +>397036 80 00 00 ff .text $80, $00, $00, $FF +>39703a 00 80 80 ff .text $00, $80, $80, $FF +>39703e 80 80 00 ff .text $80, $80, $00, $FF +>397042 80 00 80 ff .text $80, $00, $80, $FF +>397046 80 80 80 ff .text $80, $80, $80, $FF +>39704a 00 45 ff ff .text $00, $45, $FF, $FF +>39704e 13 45 8b ff .text $13, $45, $8B, $FF +>397052 00 00 20 ff .text $00, $00, $20, $FF +>397056 00 20 00 ff .text $00, $20, $00, $FF +>39705a 20 00 00 ff .text $20, $00, $00, $FF +>39705e 20 20 20 ff .text $20, $20, $20, $FF +>397062 40 40 40 ff .text $40, $40, $40, $FF +>397066 ff ff ff ff .text $FF, $FF, $FF, $FF +>39706a 00 00 00 ff bg_color_lut .text $00, $00, $00, $FF +>39706e 00 00 80 ff .text $00, $00, $80, $FF +>397072 00 80 00 ff .text $00, $80, $00, $FF +>397076 80 00 00 ff .text $80, $00, $00, $FF +>39707a 00 20 20 ff .text $00, $20, $20, $FF +>39707e 20 20 00 ff .text $20, $20, $00, $FF +>397082 20 00 20 ff .text $20, $00, $20, $FF +>397086 20 20 20 ff .text $20, $20, $20, $FF +>39708a 1e 69 d2 ff .text $1E, $69, $D2, $FF +>39708e 13 45 8b ff .text $13, $45, $8B, $FF +>397092 00 00 20 ff .text $00, $00, $20, $FF +>397096 00 20 00 ff .text $00, $20, $00, $FF +>39709a 40 00 00 ff .text $40, $00, $00, $FF +>39709e 10 10 10 ff .text $10, $10, $10, $FF +>3970a2 40 40 40 ff .text $40, $40, $40, $FF +>3970a6 ff ff ff ff .text $FF, $FF, $FF, $FF +>3970aa 43 6d 64 20 30 78 41 41 pass_tst0xAAmsg .text "Cmd 0xAA Test passed...", $0D, $00 +>3970b2 20 54 65 73 74 20 70 61 73 73 65 64 2e 2e 2e 0d +>3970c2 00 +>3970c3 43 6d 64 20 30 78 41 42 pass_tst0xABmsg .text "Cmd 0xAB Test passed...", $0D, $00 +>3970cb 20 54 65 73 74 20 70 61 73 73 65 64 2e 2e 2e 0d +>3970db 00 +>3970dc 43 6d 64 20 30 78 36 30 pass_cmd0x60msg .text "Cmd 0x60 Executed.", $0D, $00 +>3970e4 20 45 78 65 63 75 74 65 64 2e 0d 00 +>3970f0 43 6d 64 20 30 78 46 46 pass_cmd0xFFmsg .text "Cmd 0xFF (Reset) Done.", $0D, $00 +>3970f8 20 28 52 65 73 65 74 29 20 44 6f 6e 65 2e 0d 00 +>397108 43 6d 64 20 30 78 45 45 pass_cmd0xEEmsg .text "Cmd 0xEE Echo Test passed...", $0D, $00 +>397110 20 45 63 68 6f 20 54 65 73 74 20 70 61 73 73 65 +>397120 64 2e 2e 2e 0d 00 +>397126 4b 65 79 62 6f 61 72 64 Success_kb_init .text "Keyboard Present", $0D, $00 +>39712e 20 50 72 65 73 65 6e 74 0d 00 +>397138 4e 6f 20 4b 65 79 62 6f Failed_kb_init .text "No Keyboard Attached or Failed Init...", $0D, $00 +>397140 61 72 64 20 41 74 74 61 63 68 65 64 20 6f 72 20 +>397150 46 61 69 6c 65 64 20 49 6e 69 74 2e 2e 2e 0d 00 +>397160 4e 4f 20 53 49 47 4e 41 bmp_parser_err0 .text "NO SIGNATURE FOUND.", $00 +>397168 54 55 52 45 20 46 4f 55 4e 44 2e 00 +>397174 42 4d 50 20 4c 4f 41 44 bmp_parser_msg0 .text "BMP LOADED.", $00 +>39717c 45 44 2e 00 +>397180 45 58 45 43 55 54 49 4e bmp_parser_msg1 .text "EXECUTING BMP PARSER", $00 +>397188 47 20 42 4d 50 20 50 41 52 53 45 52 00 +>397195 49 44 45 20 48 44 44 20 IDE_HDD_Present_msg0 .text "IDE HDD Present:", $00 +>39719d 50 72 65 73 65 6e 74 3a 00 +>3971a6 42 6f 6f 74 20 44 49 50 boot_invalid .null "Boot DIP switch settings are invalid." +>3971ae 20 73 77 69 74 63 68 20 73 65 74 74 69 6e 67 73 +>3971be 20 61 72 65 20 69 6e 76 61 6c 69 64 2e 00 +>3971cc 50 72 65 73 73 20 52 20 boot_retry .null "Press R to retry, B to go to BASIC.", 13 +>3971d4 74 6f 20 72 65 74 72 79 2c 20 42 20 74 6f 20 67 +>3971e4 6f 20 74 6f 20 42 41 53 49 43 2e 0d 00 +>3971f1 55 6e 61 62 6c 65 20 74 sdc_err_boot .null "Unable to read the SD card." +>3971f9 6f 20 72 65 61 64 20 74 68 65 20 53 44 20 63 61 +>397209 72 64 2e 00 +>39720d 55 6e 61 62 6c 65 20 74 ide_err_boot .null "Unable to read from the IDE drive." +>397215 6f 20 72 65 61 64 20 66 72 6f 6d 20 74 68 65 20 +>397225 49 44 45 20 64 72 69 76 65 2e 00 +>397230 55 6e 61 62 6c 65 20 74 fdc_err_boot .null "Unable to read from the floppy drive." +>397238 6f 20 72 65 61 64 20 66 72 6f 6d 20 74 68 65 20 +>397248 66 6c 6f 70 70 79 20 64 72 69 76 65 2e 00 +>397256 42 6f 6f 74 69 6e 67 20 fdc_boot .null "Booting from floppy..." +>39725e 66 72 6f 6d 20 66 6c 6f 70 70 79 2e 2e 2e 00 +>39726d 0d 52 45 41 44 59 2e 00 ready_msg .null $0D,"READY." +>397275 41 42 4f 52 54 20 45 52 error_01 .null "ABORT ERROR" +>39727d 52 4f 52 00 +>397281 30 31 32 33 34 35 36 37 hex_digits .text "0123456789ABCDEF",0 +>397289 38 39 41 42 43 44 45 46 00 +>397292 .align 256 >397300 00 1b 31 32 33 34 35 36 ScanCode_Press_Set1 .text $00, $1B, $31, $32, $33, $34, $35, $36, $37, $38, $39, $30, $2D, $3D, $08, $09 ; $00 >397308 37 38 39 30 2d 3d 08 09 >397310 71 77 65 72 74 79 75 69 .text $71, $77, $65, $72, $74, $79, $75, $69, $6F, $70, $5B, $5D, $0D, $00, $61, $73 ; $10