* * * * * V2_OS and other strange brews Checked up on VS_OS [1] today. Surprise, surprise, they finally released the source code. Immediately downloaded it and took a look. Nothing surprising really, except that the source code to the bootsector is missing. Or rather, there is code to a boot sector, but … > BOOTIMAGE DB 0E9H, 011H, 001H, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 02BH, 056H > DB 032H, 05FH, 046H, 053H, 02BH, 000H, 030H, 030H, 030H, 02EH > DB 030H, 030H, 035H, 000H, 080H, 000H, 000H, 000H, 000H, 000H > DB 000H, 000H, 044H, 033H, 022H, 011H, 010H, 000H, 000H, 000H > DB 000H, 000H, 000H, 000H, 000H, 000H, 00DH, 00AH, 056H, 032H > DB 02DH, 04FH, 053H, 020H, 056H, 030H, 02EH, 031H, 020H, 028H > DB 043H, 029H, 031H, 039H, 039H, 039H, 020H, 056H, 032H, 05FH > DB 04CH, 061H, 062H, 02CH, 020H, 052H, 06FH, 074H, 074H, 065H > DB 072H, 064H, 061H, 06DH, 02EH, 00DH, 00AH, 000H, 04CH, 06FH > DB 061H, 064H, 069H, 06EH, 067H, 020H, 053H, 079H, 073H, 074H > DB 065H, 06DH, 031H, 036H, 000H, 00DH, 00AH, 046H, 061H, 069H > And some interesting code like: > MOV DI, OFFSET PARTLIST > MOV AL, 'f' > MOV DS:[DI+0], AL > MOV DS:[DI+16], AL > MOV AL, 'd' > MOV DS:[DI+1], AL > MOV DS:[DI+17], AL > MOV AL, '0' > MOV DS:[DI+2], AL > MOV DS:[DI+18], AL > MOV AL, 0 > MOV DS:[DI+3], AL ; 'FD0',0 > MOV DS:[DI+19], AL > Two things wrong here (at least for 80x86 Assembly): 1. Using DI instead of EDI in 32-bit mode. This causes an extra byte of opcode to be generated for a 16-bit offset. 2. Moving individual letters into locations. If you are doing this at this level, you can do better by: > > mov eax,$00306466 ; 'fd0',0 > mov [edi],eax ; DS: override > mov [edi+16],eax ; not needed > > > In poking around, I found a link to RDOS, [2] another 80x86 operating system written in Assembly. This one is impressive, if only because it's a functional OS in about 130,000 lines of Assembly (including TCP/IP). Haven't had much time to look around this one though. [1] http://www.v2.nl/nl_os/ [2] http://www.rdos.net/rdos/index.htm Email Sean Conner at sean@conman.org .