flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Floppy Disk Help |
Author |
|
Dex4u 13 Feb 2007, 16:14
We need more info, like code for bin, what you used to write .bin file to floppy etc.
Eg: is your bin file 512 bytes in size, with something like this at the end ? Code: times 510- ($-start) db 0 dw 0xaa55 |
|||
13 Feb 2007, 16:14 |
|
Jakevfr 13 Feb 2007, 17:29
Here's the code I'm trying (It's in NASM format because the tutorial I'm following uses NASM)
Code: push word 0b800h pop es xor di, di mov [es:di], word 441h jmp $ times 510 - ($ - $$) db 0 db 55h db 0aah Thanks |
|||
13 Feb 2007, 17:29 |
|
Jakevfr 13 Feb 2007, 19:15
Sorry for the double post, but I just got it to work. It turns out I was comiling it wrong. Thanks for your help
|
|||
13 Feb 2007, 19:15 |
|
Dex4u 13 Feb 2007, 19:21
Just in case more examples:
example1 C:\FASM TEST.ASM TEST.BIN put it on a floppy with rawrite. Code: org 0x7C00use16;****************************; Realmode startup code.;****************************start: xor ax,ax mov ds,ax mov es,ax mov ss,ax mov sp,0x7C00;*************************************; Print message.;************************************* mov ax,0xB800 mov es,ax lea si,[msg0] mov di,(80 * 1 + 2) * 2 mov cx,26 cld rep movsb jmp $ msg0 db " H E L L O W O R L D ! " ;*************************************; Make program 510 byte's + 0xaa55;*************************************times 510- ($-start) db 0dw 0xaa55 example2 With bios. C:\FASM TEST.ASM TEST.BIN put it on a floppy with rawrite. Code: org 0x7C00use16;****************************; Realmode startup code.;****************************start: xor ax,ax mov ds,ax mov es,ax mov ss,ax mov sp,0x7C00;*************************************; Print message.;************************************* mov si,msg0 call print jmp $;====================================================;; print. ;;====================================================;print: mov ah,0Eh ; Request displayagain1: lodsb ; load a byte into AL from DS:SI or al,al ; Or AL jz done1 ; Jump 0, to label done1 int 10h ; Call interrupt service jmp again1 ; Jump to label again1done1: ret ; Return msg0 db " Hello world! " ;*************************************; Make program 510 byte's + 0xaa55;*************************************times 510- ($-start) db 0dw 0xaa55 |
|||
13 Feb 2007, 19:21 |
|
Mac2004 14 Feb 2007, 16:57
Maybe my boot sector example could help you in some way?
http://board.flatassembler.net/topic.php?t=6529 Regards, Mac2004 |
|||
14 Feb 2007, 16:57 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.