Video Clip of the Background Music, "Volves Valley - Ambush" : http://www.youtube.com/watch?v=e3lQiD-JCgM
DOS File Name File Size Long File Name Description
WIN95_~1 ASM 32.547 win95_boot_sector.asm Boot Sector Code Sample ENABLE~1 ASM 4.408 enableA20.asm IO Programming Sample IDEHDC ASM 23.440 idehdc.asm HD IO Programming Sample HDPORTS ASM 6.261 HDPORTS.ASM HD IO Programming Sample SIMPL_PM ASM 3.851 SIMPL_PM.asm Protected Mode Sample SB_DSP ASM 4.854 SB_DSP.ASM Sound Card programming SBDETECT ASM 9.896 SBDETECT.ASM Sound card Programming VOODOO ASM 3.512 voodoo.asm Unreal Mode Programming IE8086 C 51.517 ie8086.c CD-ROM Driver Source Code BOOTAB~1 DOC 117.760 BootableCDFormat.doc Bootable CD Word Document ISO966~1 HTM 22.288 iso9660.html ISO9660 CD-ROM FS Document ATA-AT~1 HTM 38.484 ATA-ATAPI_HIW.html ATA-ATAPI Explanations JOLIET~1 HTM 29.198 Joliet.html Joliet Format (CD-ROM FS) IDE_RE~1 HTM 54.297 IDE_Reference_FAQ.html IDE Reference Document LINUX2~1 HTM 10.994 Linux 2_0 Boot Sector.html Linux Boot Sector Code CP_PAR~1 PDF 78.329 CP_Parallel.pdf Parallel Port Programming CP_SER~1 PDF 143.030 CP_Serial.pdf Serial Port Programming D1510R0A PDF 289.842 d1510r0a.pdf ATA Host Adapter Standards FATFOR~1 PDF 109.659 FatFormat.pdf Microsoft FAT File System INFO_S~1 PDF 81.155 Info_Spec_Bootable_CD-ROM.pdf Bootable CD SFF Document 3DNOW PDF 563.265 3dnow.pdf AMD 3D-NOW Programming INTROD~1 PDF 200.211 IntroductionToISO9660.pdf ISO9660 FS Document BIOSBO~1 PDF 183.180 BIOSBootSpecsV1.01.pdf BIOS Boot Specification PBIOS_~1 PDF 424.320 pbios_userman.pdf Phoenix BIOS User Manual INTELC~1 PDF 145.670 IntelCodeTable.pdf 80x86 Instructions Table V1VLLA89 PDF 168.521 v1vlla89.pdf MS FAT32 FS Specification LONGFI~1 PDF 86.091 LongFileName.pdf MS Long FileName Spec PCASM-~1 PDF 570.623 pcasm-book.pdf PC Assembly Book OMF11~1 PDF 161.416 OMF1.1.pdf Object Module Format PE PDF 49.441 PE.pdf Portable Exe Formats MSCDEX21 TXT 132.784 MSCDEX21.txt MSCDEX 2.1 Document AWE32P10 TXT 50.840 AWE32P10.TXT SB AWE32 Programming PENTIUM TXT 37.905 pentium.txt Pentium CPU Instructions PMODE-OS TXT 76.099 PMODE-OS.txt Protected Mode Development MBR TXT 12.769 MBR.txt Masterboot Document BIOS-ASM ZIP 37.262 bios-asm.zip IBM PC/XT BIOS Source Code PCATBIOS ZIP 147.725 pcatbios.zip IBM PC/AT BIOS Source Code ATA3-R6 ZIP 284.044 ATA3-R6.ZIP ATA-3 Revision 6 Document PM-9-94 ZIP 87.168 PM-9-94.ZIP Protected Mode Programming OS-FAQ ZIP 56.497 os-faq.zip OS Development FAQs OBJ_FORM ZIP 58.048 OBJ_FORM.ZIP MS OBJ Format Documents 386P_101 ZIP 117.845 386P_101.ZIP 386 Extender Source 386P_200 ZIP 313.803 386P_200.ZIP 386 Extender Source MYBOOT~1 ZIP 23.775 MyBootSector.zip Boot Sector Programming NASM098T ZIP 104.244 nasm098t.zip Netwide Assembler Document NASM098P ZIP 105.804 nasm098p.zip NASM Program v0.98 32 bit NASM098R ZIP 77.587 nasm098r.zip NASM Program v0.98 16 bit NASM098S ZIP 546.166 nasm098s.zip NASM Program Source Code NASM098D ZIP 443.455 nasm098d.zip NASM Documents (html) PMTUTS ZIP 207.788 pmtuts.zip ! PM Startup ! Protected Mode Tutorials (ASM) ATADRVR ZIP 84.916 atadrvr.zip ATA IO Driver Source Code READCDA ZIP 19.524 READCDA.zip Audio CD Reader Source WIN32HST ZIP 149.789 win32hst.zip WIN32 Assembly Programming DASM ZIP 426.065 dasm.zip Disassemblers (DOS) LOS4D ZIP 111.802 los4d.zip ! OS & Standalone ! Low Level DOS Programming 386INTEL ZIP 178.580 386INTEL.zip 80386 Programming Document SOUNDX ZIP 33.084 SOUNDX.ZIP Sound Blaster Programming PNPISA ZIP 130.840 pnpisa.pdf PNP ISA Specification v1.0a AGP30_~1 PDF 789.523 agp30_final_10.pdf AGP Interface Specification PCI22 PDF 3.835.430 PCI22.pdf PCI Local Bus Specification 78XWW-CA PDF 207.164 78xww-ca.pdf (Device Mapping) Pentium Modules (PCI Config) PCI_CO~1 TXT 1.538 pci_config_space.txt (Pascal) PCI Configuration Sample ATAPI-~1 PDF 532.117 ATAPI-SFF8020i.pdf ATAPI Specification Rev 2.6 ATAPI-~2 PDF 790.350 atapi-cdd3610.pdf (CD-Writer) Philips CD-R/W Specification ECMA-119 PDF 327.807 Ecma-119.pdf ! ISO9660 book ! ECMA-119 (ISO9660) Standard CHIPSETS PDF 557.628 chipsets.pdf Motherboad Chipsets BUS21B~1 PDF 66.901 bus21bridge.pdf PCI to Local Bridge Study ESCD PDF 101.994 escd.pdf ESCD Specification v1.02ASTi5518 CPU/Single-Chip Set-Top-Box Decoder CONFIDENTAL: http://www.singlix.net/freetv/sti5518/ (DVB-STB) (Assembler, Disassembler and Programming Guide files for STi5518 processor for DVB Satellite Receivers) Microsoft Macro Assembler 6.11 (for DOS) full : masm611.zip (4 MB) ART OF ASSEMBLY book : http://webster.cs.ucr.edu/index.html (by Randall Hyde) MASM32 Windows (GUI) Assembler: http://www.movsd.com/ (hutch's home page) http://www.usb.org (USB Specifications) http://www.t13.org (AT&ATAPI Specifications)http://www.microsoft.com/hwdev/resources/specs/default.asp (Various Documents)SINGLIX File System Project (as single/standard, ATA=512 byte/sector, ATAPI= 2048 byte/sector disk FS)
(as an alternative to ext2, ext3, reiserfs, FAT, FAT32, ntfs and iso9660 file systems)
the Fastest FS ... the Simplest FS (except FAT16 FS) ... [ for all non-sequental (random accessable), file based data storage devices ]Components of SINGLIX ATA/ATAPI disk file system:
* Boot Sector Parameters (BS) [ Basic features of SINGLIX file system ]
* Master Allocation Table (MAT) [ Disk Allocation Table Descriptor/Header ]
* Disk Allocation Table (DAT) [ Allocation Table of Disk Sections ]
* File Descriptor Table (FDT) [ File Data Section Header ]
* Root Directory Descriptor Table (RDT) [ Root Directory Entry Section Header ]
* Sub Directory Descriptor Table (DDT) [ Sub Directory Entry Section Header ]
SAMPLE 1 : multixfd.asm [ Sample MS-DOS Program formats 1.44 MB Floppy Disk for Bootable Singlix FS ]
SAMPLE 2 : SINGLIX FS1 File System Image File Manipulation (a windows program)
* Building a new non-bootable SINGLIX FS1 (Floppy Disk 1.44 MB) File System by using Visual Basic Program
* Manipulating SINGLIX FS Image File via Visual Basic Program
* Copying startup file and other files to SINGLIX FS Image File
* Writing image file to disk. (Building singlix file system on the disk.)Recent VB (5.0/6.0) Project files : fs_basic.zip (Not completed yet!)
Binary File Editor 2.0 Alfa VB (5.0/6.0) project Files : bfe_src.zip
Private Sub fsSaveFile_Click() Label1.Caption = "" If ImageFileName = "" Then Label1.Caption = "FS Image File : NONE" MsgBox ("There is not a loaded SINGLIX FS Image file !"), 48, " Save as FS File" Label1.Caption = "" Exit Sub Else If WinFileName = "" Then Label1.Caption = "Windows File : NONE" MsgBox ("There is not a loaded Windows file !"), 48, " Save as FS File" Label1.Caption = "" Exit Sub End If End If FS_FileName = "" Repeat1: Label1.Caption = "FS Directory : " + FS_CDIR FS_FileName = InputBox("FS File Name :", " Save as Singlix FS File", WinFileName) FS_FileName = Trim$(FS_FileName) Label1.Caption = Label1.Caption + Chr$(13) + Chr$(10) + "FS File : " + FS_FileName L = Len(FS_FileName) If L > 0 Then If L > 64 Then MsgBox ("FS File name must not be more then 64 bytes !"), 48, " Save as Singlix FS File" GoTo Repeat1 Else For X = 1 To L Y = AscB(Mid$(FS_FileName, X, 1)) If Y = AscB("/") Or Y = AscB("?") Or Y = AscB("*") Or Y = AscB(":") Or Y = AscB("\") Then MsgBox ("Invalid file name chars ('/','?','*',':','\') !..."), 48, " Save as Singlix FS File" L = 0 Exit For End If Next X If L < 1 Then GoTo Repeat1 If L < 64 Then For X = L + 1 To 64 FS_FileName = FS_FileName + Chr(0) Next X End If End If Else Exit Sub End If Free_Sectors = GetFreeSpace() FreeSpace = 512 * Free_Sectors RequiredSpace = WinFileSize + 512 If FreeSpace < RequiredSpace Then MsgBox ("The is no enough free space to save the file on the Singlix File System!..." + Chr$(13) + Chr$(10) + "Free Space = " + CStr(FreeSpace) + " bytes"), 48, " Save as FS File" Exit Sub End If Rem Sector K = WinFileSize Mod 512 If K > 0 Then SectorCount = ((WinFileSize - K) / 512) + 1 Else SectorCount = (WinFileSize - K) / 512 End If SectorCount = SectorCount + 1 BeginningSector = GetFirstFreeSector() FDT_Location = GetFirstFreeSection(BeginningSector, SectorCount) If FDT_Location = 0 Then Rem Allocation will be done later, as multi sections MsgBox ("Free consecutive sectors are not enough!..."), 48, " Save as FS File" Else Call ResetFDTBuffer FD.FDTSign = "FDT" FD.FDTVersion = 0 FD.SectorSize = 512 FD.FDTNumber = FDT_Location FD.NextFDTNumber = 0 FD.SectorCount = SectorCount - 1 FD.ParentDirNumber = FS_DirNumber FD.ParentDirSerial = FS_DirSerial FD.FileSize = WinFileSize FD.FileSizeHigh = 0 FD.FileType = 0 FD.CheckSum = 0 FD.Attributes = 1 FD.OwnerCode = 0 FD.GroupCode = 0 FD.Country = 90 FD.TimeZone = 0 FS_Second = Second(Now) FS_Minute = Minute(Now) FS_Hour = Hour(Now) FS_Day = Day(Now) FS_Month = Month(Now) FS_Year = Year(Now) FD.CreatingDate = SetFSDate(FS_Year, FS_Month, FS_Day) FD.CreatingTime = SetFSTime(FS_Hour, FS_Minute, FS_Second) FD.CTimeMode = 0 FD.LastModifDate = FD.CreatingDate FD.LastModifTime = FD.CreatingTime FD.LastMTimeMode = 0 FD.FileName = FS_FileName FD.FileDescription = 0 Call SetFDTBuffer If Chr$(FDT(0)) = "F" And Chr$(FDT(1)) = "D" And Chr$(FDT(2)) = "T" And FDT(3) = 0 And FDT(4) = 0 And FDT(5) = 2 Then Label1.Caption = Label1.Caption + Chr$(13) + Chr$(10) + "Writing FDT Sector..." DRV(0).Drv_FStatus = 0 ReturnCode = WriteSector(0, FDT_Location, 1, FDT()) DRV(0).Drv_FStatus = ReturnCode If ReturnCode <> 0 Then MsgBox ("Writing Error !"), 48, " Writing FDT" Exit Sub End If Label1.Caption = Label1.Caption + " OK." WinFileNumber = FreeFile Open WinFileName For Binary As WinFileNumber Len = 1 If FileLen(WinFileName) <> WinFileSize Then MsgBox ("File Error !"), 48, " Writing File Data" Exit Sub End If Label1.Caption = Label1.Caption + Chr$(13) + Chr$(10) + "Writing File Data..." X = 0 BeginningSector = FDT_Location For S1 = 1 To WinFileSize Get WinFileNumber, S1, Y File_Data(X) = Y X = X + 1 If X = 512 Then BeginningSector = BeginningSector + 1 ReturnCode = WriteSector(0, BeginningSector, 1, File_Data()) If ReturnCode <> 0 Then MsgBox ("Writing Error !"), 48, " Writing File Data" Exit For End If X = 0 End If Next S1 If ReturnCode <> 0 Then Exit Sub If X > 0 And X < 512 Then For X = X To 511 File_Data(X) = 0 Next X BeginningSector = BeginningSector + 1 ReturnCode = WriteSector(0, BeginningSector, 1, File_Data()) If ReturnCode <> 0 Then MsgBox ("Writing Error !"), 48, " Writing File Data" Exit Sub End If End If Label1.Caption = Label1.Caption + " OK." If FS_CDIR = "/" Then ReturnCode = ReadSector(0, FS_DirNumber, 1, RDT()) Else ReturnCode = ReadSector(0, FS_DirNumber, 1, DDT()) End If If ReturnCode <> 0 Then MsgBox ("Directory Descriptor Table Reading Error !"), 48, " Reading Directory Descriptor Table" Exit Sub End If FS_Second = Second(Now) FS_Minute = Minute(Now) FS_Hour = Hour(Now) FS_Day = Day(Now) FS_Month = Month(Now) FS_Year = Year(Now) Label1.Caption = Label1.Caption + Chr$(13) + Chr$(10) + "Updating Directory Data..." If FS_CDIR = "/" Then K = SetFSDate(FS_Year, FS_Month, FS_Day) L = CInt(K Mod 256) RDT(56) = CByte(L) K = (K - L) / 256 L = K Mod 256 RDT(57) = CByte(L) K = (K - L) / 256 L = K Mod 256 RDT(58) = CByte(L) K = (K - L) / 256 RDT(59) = CByte(K) K = SetFSTime(FS_Hour, FS_Minute, FS_Second) L = CInt(K Mod 256) RDT(60) = CByte(L) K = (K - L) / 256 L = K Mod 256 RDT(61) = CByte(L) K = (K - L) / 256 L = K Mod 256 RDT(62) = CByte(L) RDT(63) = 0 Else K = SetFSDate(FS_Year, FS_Month, FS_Day) L = CInt(K Mod 256) DDT(56) = CByte(L) K = (K - L) / 256 L = K Mod 256 DDT(57) = CByte(L) K = (K - L) / 256 L = K Mod 256 DDT(58) = CByte(L) K = (K - L) / 256 DDT(59) = CByte(K) K = SetFSTime(FS_Hour, FS_Minute, FS_Second) L = CInt(K Mod 256) DDT(60) = CByte(L) K = (K - L) / 256 L = K Mod 256 DDT(61) = CByte(L) K = (K - L) / 256 L = K Mod 256 DDT(62) = CByte(L) DDT(63) = 0 End If If FS_CDIR = "/" Then ReturnCode = WriteSector(0, FS_DirNumber, 1, RDT()) Else ReturnCode = WriteSector(0, FS_DirNumber, 1, DDT()) End If If ReturnCode <> 0 Then MsgBox ("Directory Descriptor Table Writing Error !"), 48, " Updating Directory Data" Exit Sub End If If FS_CDIR = "/" Then ReturnCode = ReadSector(0, FS_DirNumber + 1, 1, RD_Data()) Else ReturnCode = ReadSector(0, FS_DirNumber + 1, 1, SD_Data()) End If If ReturnCode <> 0 Then MsgBox ("Directory Data Reading Error !"), 48, " Updating Directory Data" Exit Sub End If If FS_CDIR = "/" Then For X = 0 To 511 Step 4 If RD_Data(X) = 0 And RD_Data(X + 1) = 0 And RD_Data(X + 2) = 0 And RD_Data(X + 3) = 0 Then K = FDT_Location L = CInt(K Mod 256) RD_Data(X) = CByte(L) K = (K - L) / 256 L = K Mod 256 RD_Data(X + 1) = CByte(L) K = (K - L) / 256 L = K Mod 256 RD_Data(X + 2) = CByte(L) K = (K - L) / 256 RD_Data(X + 3) = CByte(K) Exit For End If Next X Else For X = 0 To 511 Step 4 If SD_Data(X) = 0 And SD_Data(X + 1) = 0 And SD_Data(X + 2) = 0 And SD_Data(X + 3) = 0 Then K = FDT_Location L = CInt(K Mod 256) SD_Data(X) = CByte(L) K = (K - L) / 256 L = K Mod 256 SD_Data(X + 1) = CByte(L) K = (K - L) / 256 L = K Mod 256 SD_Data(X + 2) = CByte(L) K = (K - L) / 256 SD_Data(X + 3) = CByte(K) Exit For End If Next X End If If FS_CDIR = "/" Then ReturnCode = WriteSector(0, FS_DirNumber + 1, 1, RD_Data()) Else ReturnCode = WriteSector(0, FS_DirNumber + 1, 1, SD_Data()) End If If ReturnCode <> 0 Then MsgBox ("Directory Data Writing Error !"), 48, " Updating Directory Data" Exit Sub End If Label1.Caption = Label1.Caption + " OK." ReturnCode = ReadSector(0, MAT_Location, 1, MAT()) If ReturnCode <> 0 Then MsgBox ("Reading Error !"), 48, " Reading MAT Sector" Exit Sub End If Rem S1 = CDbl(MAT(15)) Rem S1 = 16777216 * S1 Rem S2 = CLng(MAT(14)) Rem S2 = 65536 * S2 Rem S3 = CLng(MAT(13)) Rem S3 = S3 * 256 Rem S4 = CInt(MAT(12)) Rem Sector Rem DAT_Location = S1 + S2 + S3 + S4 Rem S1 = CDbl(MAT(19)) Rem S1 = 16777216 * S1 Rem S2 = CLng(MAT(18)) Rem S2 = 65536 * S2 Rem S3 = CLng(MAT(17)) Rem S3 = S3 * 256 Rem S4 = CInt(MAT(16)) Rem Sector Count Rem DAT_SCount = CLng(S1 + S2 + S3 + S4) L = WinFileSize Mod 512 If L > 0 Then K = ((WinFileSize - L) / 512) + 1 Else K = (WinFileSize / 512) + 1 End If S1 = GetFreeSpace() FreeSpace = S1 - (K + 1) ReturnCode = ReadSector(0, DAT_Location, DAT_SCount, DAT()) If ReturnCode <> 0 Then MsgBox ("Reading Error !"), 48, " Reading DAT Sectors" Exit Sub End If L = CInt(FDT_Location) DAT(L) = &H5 For K = L + 1 To L + K L = CInt(K) DAT(L) = &HF0 Next K ReturnCode = WriteSector(0, DAT_Location, DAT_SCount, DAT()) If ReturnCode <> 0 Then MsgBox ("Writing Error !"), 48, " Writing DAT Sectors" Exit Sub End If K = FreeSpace L = CInt(K Mod 256) MAT(20) = CByte(L) K = (K - L) / 256 L = K Mod 256 MAT(21) = CByte(L) K = (K - L) / 256 L = K Mod 256 MAT(22) = CByte(L) K = (K - L) / 256 MAT(23) = CByte(K) S1 = CDbl(MAT(27)) S1 = 16777216 * S1 S2 = CLng(MAT(26)) S2 = 65536 * S2 S3 = CLng(MAT(25)) S3 = S3 * 256 S4 = CInt(MAT(24)) BeginningSector = S1 + S2 + S3 + S4 K = GetFirstFreeSection(BeginningSector, 1) L = CInt(K Mod 256) MAT(24) = CByte(L) K = (K - L) / 256 L = K Mod 256 MAT(25) = CByte(L) K = (K - L) / 256 L = K Mod 256 MAT(26) = CByte(L) K = (K - L) / 256 MAT(27) = CByte(K) ReturnCode = WriteSector(0, MAT_Location, 1, MAT()) If ReturnCode <> 0 Then MsgBox ("Writing Error !"), 48, " Writing MAT Sector" Exit Sub End If MsgBox ("File has been recorded on the Singlix FS '" + FS_CDIR + "' directory as '" + FS_FileName + "'"), 0, " Save Open/Windows File as Singlix FS File" Label1.Caption = "FS Directory : " + FS_CDIR Label1.Caption = Label1.Caption + Chr$(13) + Chr$(10) + "FS File : " + FS_FileName Label1.Caption = Label1.Caption + Chr$(13) + Chr$(10) + "File Size: " + CStr(WinFileSize) + " bytes." End If End If End SubPrivate Function WriteSector(DrvNumber As Integer, Sector As Double, SectorCount As Long, Buffer() As Byte) As Long Dim Offset As Double Dim Count As Double Dim Location As Double Dim WriteByte As Byte Dim Counter As Integer If DrvNumber > 31 Then WriteSector = -1 Exit Function End If ImageFileName = Trim$(DRV(DrvNumber).Drv_FName) If ImageFileName = "" Then WriteSector = -1 Exit Function End If If Dir(ImageFileName) <> ImageFileName Then WriteSector = -1 Exit Function End If ImageFileSize = FileLen(ImageFileName) If ImageFileSize <> DRV(DrvNumber).Drv_FSize Then WriteSector = -1 Exit Function End If Offset = (Sector * 512) Count = SectorCount * 512 If Count < 512 Then WriteSector = -1 Exit Function Else If Offset > ImageFileSize - 512 Then WriteSector = -1 Exit Function End If End If On Error GoTo ReturnErrCode ImageFileNumber = FreeFile DRV(DrvNumber).Drv_FNumber = ImageFileNumber Open ImageFileName For Binary As ImageFileNumber Len = 1 For Location = Offset + 1 To Offset + Count WriteByte = Buffer(Counter) Put ImageFileNumber, Location, WriteByte Counter = Counter + 1 Next Location WriteSector = 0 Close ImageFileNumber DRV(DrvNumber).Drv_FStatus = 0 FCikis: DRV(DrvNumber).Drv_FNumber = 0 Exit Function ReturnErrCode: WriteSector = CLng(Err.Number) DRV(DrvNumber).Drv_FStatus = WriteSector Close ImageFileNumber GoTo FCikis End FunctionATAPI CD-ROM & ISO 9660 FS Programming Samples (in MASM) : ataid.html atapinq.html readpvdl.html
NOTE: html files include code & links to sample ASM files and zip files for CD-ROM & ISO9660 assembly programming.
8 bit CheckSum (CRC) Calculation Sample: CHKSUM.ASM CHKSUM.COM (8086 assembly)
MASM 6.11 -> "masm.bat" or "new-vars.bat"
< masm chksum, link /t chksum > or < ml /Zm /AT CHKSUM.ASM >
proc_calculate_checksum -> INPUT: DS:SI = DOS Short DirEntry location, OUTPUT: AL = CheckSum value
TR-DOS Operation System KERNEL Features -> DRV INIT & Disk Info -> DISKINFO.ASM [ DISKINFO.COM ]
DISKINFO.COM : (Standalone MS-DOS program, uses ROMBIOS interrupts only, except INT 20h)
(Uses TR-DOS kernel's DRV_INIT process, does not use any data or functions from MS-DOS kernel)
After MASM.BAT : < masm diskinfo, link /t diskinfo > or < ml /Zm /AT DISKINFO.ASM >
© Erdogan Tan - will provide FREE Support to all OS developers via SINGLIX web site
Erdogan Tan's Home Page : http://www.singlix.com/417/homepage.html
Download Visual Basic Source Code and Programs : ../download/index.html
Entrance: index.html [ Last Update: 4/5/2008 ]