.model tiny .386 .data mystring db 'Any key will load... NixOS!',0 errorStr db 'error..',0 .code ORG 100H START: ; stuff.. ; db 0EAh ;jmp far SEG:OFS ;Currently we are at 0:7C00 ; dw OFFSET start, 7C0h ;This makes us be at 7C0:0 ; setting up segregs .. hopefully this will do good! :) mov ax,7c0h mov ds,ax mov es,ax ; not sure what this does... mov ax,9000h mov ss,ax mov sp,0ffffh jmp @StartP @error: mov bx,7c0h mov es,bx mov bp,offset errorStr-100h mov ax,1300h ; write string, no cursor update mov bh,0 ; bgcolor 0 mov bl,10 ; foreground 10 = light green mov cx,27 ; lenght of text mov dh,13 ; Ypos mov dl,26 ; Xpos int 10h ; whee! @startP: ; clear screen - just for kicks mov ax,3 int 10h ; write the loading msg ; mov ax,ds ; set up ds:bp at mystring ; mov ax,0 ; trying this... since we're on 0:7c00h ; mov es,ax mov bp,offset mystring-100h mov ax,1300h ; write string, no cursor update mov bh,0 ; bgcolor 0 mov bl,10 ; foreground 10 = light green mov cx,27 ; lenght of text mov dh,11 ; Ypos mov dl,26 ; Xpos int 10h ; whee! ; wait for a keypress mov ax,1 int 16h ; reset diskette (and HD) controller xor ah,ah xor dl,dl ; dont think i need this line.. int 13h ; Read the next sector into 0:7c00h+512 xor ax,ax mov es,ax ; segment 0 mov ah,02h ; read sector mov al,01h ; read 1 sector xor ch,ch ; track 0 mov cl,2 ; sector 2 xor dl,dl ; drive 0 = A xor dh,dh ; head 0 mov bx,7c00h ; to 7c00h... add bx,512 ; and add 512 (one sector-length) int 13h ; BIOS disk IO int. Int 25/26 are DOS. jc @error mov ax,7c00h add ax,512 jmp ax ; make the jump! we do it in machine code, tasm complains about jmp far ; db 0eah ; jmp far a000h:0 ; dw 00000h ; dw 0a000h ; nice to have while debuggin' ;) ; mov ax,4c00h ; int 21h END START