Added: 4 years ago
From: youhakim
Views: 15,152
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (34)

Sign In or Sign Up now to post a comment!
  • is 01011 = 5 in machine code?

  • I am curious, do ints 0x21, 0x16, and 0x29 work under these conditions?

  • @Goalatio just int 0x16

    int 0x21 is a dos interupt

    int 0x29 i dont know this interupt

  • @TheComputaNerd Yep, I figured it out for myself not long after I wrote that comment.  Thanks for the reply though.

  • @Goalatio no problem XD

  • Instead of an infinite loop you could do:

    cli

    hlt

    That'd halt the CPU, too, but doesn't use up resources.

  • can this program copy itself to a floppy?

  • assembly language does not make sence, i know many high level languages for software programing, but this is crazy. But im just getting started with this stuff, so oh well ! =D

  • FINALLY A NASM TUTORIAL!!! THANKS!!!

  • No need to XOR BL because that only applies in graphics modes.

    You only need to set AH and AL.

  • Hey youhakim, very good tutorial. One thing, I would like to know which version of the MASM assembler you are using because I only found masm32 and cannot get it to assemble the code you provided to a BIN image. Thanks in advance.

  • It is NASM not MASM! and the NASM 16 bits and 32 bits compilers are available on sourceforge or just use google.

  • Oh... No wonder why it didn't work. Thanks for your help youhakim.

  • Good working,

    regards

  • Hello youhakim, I have another question because I programming in C++/Pascal and don't know good assembler can I develope .bin file in another language(not Assembler)? I want to program luncher in .bin programm what load all drivers cdrom/etc and ram drive/copy some files and run my own 16bit C++ .exe program after it. Thanks for reply

  • If you add 512 null characters after the rest of your text, doesn't the program become larger than 512 bytes? I would think that your code that prints "Hello World", plus your 512 character loop, would extend past the 512 byte boundary. Is that correct, or am I missing something. Great video! Thanks!

  • I didn't add 512 null characters after the rest of my text!

    If you are talking about "time 512 - (dollar - double dollars ) db 0" instruction then you should know that this particular instruction adds as many null characters as needed so the program will be exactly 512 characteres.

    (the program that displays "Hello world!") + (time 512 - (dollar - double dollars ) db 0) = 512 bytes.

    Thanks for your comment.

  • Thanks for explaining that! It makes sense now. If you made your program 512 bytes, where would your partition table be stored? The master boot record contains the boot code and it is 512 bytes in size. But it also must contain the partition table for the drive which takes up 64 bytes of that master boot record, so if you made your boot code 512 bytes long, it would over-write your partition table, wouldn't it? The boot code should only be no more than 446 bytes in size.

  • Yes you are right, the structure of a real MBR program must hold the table of primary partitions, but again I wasn't programming a real MBR program as I wrote on one of the comments above.

    A real MBR program total size is 512 = 446 + 64 + 2.

    446 bytes for the program itself.

    64 bytes for the partition table.

    2 bytes for the signature.

    Thank you again jamie1974 for your comment :)

  • OK. Thanks for your help and for a very interesting and educational video!

  • where the fuck is ///023323abcqw//youwillneverfi­ndit// on your system ??!!

  • Give him a break you douche. He's trying the best he can.

  • well this is a slow response, what ever it is i dont give a shit

  • I like FASM's syntax better

  • how can i get this language translated into fasm?

  • I love your tutorials, but could you help teach Assembly using the NASM syntax instead of the TASM?

  • Youhakim I have one question for you. Why you didn`t use a magic number in your boot sector program. I mean the the "aa55h" numbers. Some time ago i made my own boot sector and I had to add this numbers at the end of file.

  • Well, a real master boot record program must have a signature wich happens to be the value often represented as "0xAA55". This value must be in the last two bytes of the 512 bytes -the size of a MBR -(the two bytes than are 511,512). Now I didn't use the signature otherwise called the magic number because I don't need someone to recognize the simple program I created above as a real valid master boot record! do I?

    Thanks.

  • OK, now I understand. But I have to be completly sure that I understand, so I`m going to read some documentations in Internet about bootsectors and magic numbers. Thank you for help :)

  • OK, now I understand. But I have to be completly sure that I understand, so I`m going to read some documentations in Internet about bootsectors and magic numbers. Thank you for help :)

  • thank you youhakim intresting stuff :)

  • nice...now build you own OS :)

  • please ive been lookin for a vid like it!

  • Nice video, thanks

  • Nice, I followed the entire thing and got it to work. Thank you.

  • Very interesting video :) Can't wait to see more!

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more