flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > OS Doesn't print string!!! Goto page 1, 2, 3, 4 Next |
Do you think that it is possible to create a semi-useful OS in 512 BYTES??? | |||||||||||||||||||||
|
|||||||||||||||||||||
Total Votes : 40 |
Author |
|
roticv 01 Aug 2004, 14:31
Where is your int 13h? Anyway the "parameters" to your int (if it actually exist) looks wrong, but I did not have time to check the interrupt list.
|
|||
01 Aug 2004, 14:31 |
|
ASHLEY4 02 Aug 2004, 00:47
adefeo wrote: I am trying to write a simple realmode OS that prints a string to the screen and halts. The code below is what I have, but it doesn't work. What's wrong??? Roticv is right, there is no int 13h, try the mods as indicated. \\\\|//// (@@) ASHLEY4. |
|||
02 Aug 2004, 00:47 |
|
Foamplast 10 Aug 2004, 21:34
Two years ago I wrote a program that being written to the boot sector loads into the memory, reads sectors of HDD using ports (LBA mode), displays a message and executes loaded sectors.
So then, it is possible to have useful program in 512 bytes. |
|||
10 Aug 2004, 21:34 |
|
crc 10 Aug 2004, 21:39
Quote: Two years ago I wrote a program that being written to the boot sector loads into the memory, reads sectors of HDD using ports (LBA mode), displays a message and executes loaded sectors. That's more of a monitor program than an OS. A monitor is all that's needed to load/run programs, but it's really an OS. Btw, do you still have the code to that program? I'd like to see it |
|||
10 Aug 2004, 21:39 |
|
ASHLEY4 11 Aug 2004, 03:05
I think it would be fun, to have a small compation, to see who could make the best OS (as in most functional) that fits in 512 bytes.
I many year's ago made a number of small games that fitted in the boot sector of a floppy, the idea was to have them on the floppy, instead of the normal mesage, so when people left a floppy in the a: drive,a mesage came up saying "You have left a disk in the A: drive, remove the disk and press esc to continue, or press the A key to play a game etc. \\\\|//// (@@) ASHLEY4. |
|||
11 Aug 2004, 03:05 |
|
pelaillo 11 Aug 2004, 03:41
Hey! the first contest on this forum. You could define the rules (fits in 512 bytes) and the deadline date.
Nice |
|||
11 Aug 2004, 03:41 |
|
ASHLEY4 11 Aug 2004, 04:51
Then i would not be eligible to enter .
This is some code for a small game (needs finishing) that fits on boot sector instead of that silly mesage. Code: ; small game demo, compile with fasm.; c:\fasm game.asm game.comorg 0x100use16start: mov al,0x13 int 0x10LetsGo: push word 0x8000 pop es push cs pop ds mov cx,0xffff mov al,20 rep stosb call PutLine mov si,BallY2 mov bx,[si-6] mov dx,[si-4] cmp dx,195 jb CmpY jmp NegYCmpY: cmp dx,1 jg AddYNegY: neg word [si]AddY: add dx,[si] sub si,2 cmp bx,310 jb CmpX jmp NegXCmpX: cmp bx,6 jg AddXNegX: neg word [si]AddX: add bx,[si] sub si,8 mov di,dx imul di,320 add di,bx mov cl,4BALL: mov [es:di], dword 0x5C5C5C5C add di,320 loop BALL mov [si+4],bx mov [si+6],dx push es pop ds push word 0xA000 pop es mov cx,32000 xor si,si mov di,si rep movsw mov ah,0x11 int 0x16 jz LetsGo mov ax,0x0003 int 0x10 retPutLine: mov al,15 mov di,158 mov cl,198Dog: add di,319 stosb loop Dog xor di,di call Hline xor dx,dx xor di,di mov cl,199 Gridlp3: stosb add di,318 stosb loop Gridlp3 call Hline ret Hline: mov al,15 mov cx,319 rep stosb retBallX1 dw 160BallY1 dw 100BallX2 dw -1BallY2 dw -1 Only about 178 bytes. \\\\|//// (@@) ASHLEY4. |
|||
11 Aug 2004, 04:51 |
|
pelaillo 11 Aug 2004, 13:13
ASHLEY4 wrote: Then i would not be eligible to enter . |
|||
11 Aug 2004, 13:13 |
|
ASHLEY4 11 Aug 2004, 17:41
Would i not have a advantage, if i set the rules ? .
\\\\|//// (@@) ASHLEY4. |
|||
11 Aug 2004, 17:41 |
|
pelaillo 11 Aug 2004, 18:17
If the rules are simple and clearly stated since the beginning, I don't see any problem. Moreover, it would be even more interesting.
A draft could be: 1st Fasm Coders' Contest wrote:
|
|||
11 Aug 2004, 18:17 |
|
ASHLEY4 11 Aug 2004, 22:51
What about bios, that can be called a external assistance ?.
\\\\|//// (@@) ASHLEY4. |
|||
11 Aug 2004, 22:51 |
|
pelaillo 11 Aug 2004, 23:26
Maybe limiting point 5 above to use only BOCHS default bios?
|
|||
11 Aug 2004, 23:26 |
|
ASHLEY4 12 Aug 2004, 00:49
I am not a fan of bochs, not the program, but the idea that you emulat a pc, use a real pc to test.
I would like the rules to be very simple, it must not be bigger than 512 bytes and that it fits on the boot sector of a floppy, you can use bios, or any other, but it must be no bigger than 512 byte's we all have vote and you can not vote for your self, the winner will be able to have letters after his/her name for one year like "TOP GEEK" . The idea is to end up with the Worlds smallest useable OS. ps: I think you should be allowed to use external programs, but for demo only,not as part of the os. eg: you could load a com file from disk to show your os can do this, but what that com file does can not be taken into counted. \\\\|//// (@@) ASHLEY4. |
|||
12 Aug 2004, 00:49 |
|
crc 12 Aug 2004, 11:08
Quote: I am not a fan of bochs, not the program, but the idea that you emulat a pc, use a real pc to test. What if you use some non-standard hardware feature that doesn't work on all computers? For instance, I have a really simple hard disk driver (100 lines of assembly) that requires some tweaking for each computer it runs on (timings and such). Using Bochs as a standard allows all of us to test it. And we don't all have floppy drives either Personally, I'm going to attempt to write a protected mode OS/monitor in 512 bytes; just to see if I can do it. I really hope we do go through with the contest. |
|||
12 Aug 2004, 11:08 |
|
ASHLEY4 12 Aug 2004, 15:41
Quote: What if you use some non-standard hardware feature that doesn't work on all computers? For instance, I have a really simple hard disk driver (100 lines of assembly) that requires some tweaking for each computer it runs on (timings and such). Using Bochs as a standard allows all of us to test it. And we don't all have floppy drives either . I do not say that, there is no place for BOCHS, (for people with 1 computer, for debugging, etc), but should not be compulsory for this contest. As for making a os, it should work on 90% of pc, keep it simple, do not use non-standard hardware feature and by carefully programming and testing most code can be tweeted to run on standard hardware. Also floppy images can be put a cd-rw as a bootable and booted from the cd, as it emulates a floppy, so you do not need a floppy for testing. To use BOCHS for anything, other than what i put above is admitting defeat as a OS maker. your OS becomes nothing more than a program, you mays well make a OS for a web browser. PS: I for one am a fan of your work crc . \\\\|//// (@@) ASHLEY4. |
|||
12 Aug 2004, 15:41 |
|
pelaillo 12 Aug 2004, 17:59
The idea with BOCHS is to have a "standard hardware implementation". If your OS runs in BOCHS, certainly sure it will run in nearly all PCs. The contrary is not true.
Otherwise why you can determine if a contestant's entry will run on 90% PC or what's a non-standard hardware feature? Sorta MissUniverse with all girls using the same bikini |
|||
12 Aug 2004, 17:59 |
|
crc 12 Aug 2004, 20:32
I agree with pelaillo - it's good to have a standard implementation for testing. Let's say you use VESA2. None of my computers implement this properly, so I couldn't test your OS. I agree: your OS should run on real hardware. But there advantages to using Bochs:
Quote: Also floppy images can be put a cd-rw as a bootable and booted from the cd, as it emulates a floppy, so you do not need a floppy for testing. What if you don't have a CD-R/RW drive or access to one? For instance, the PC I formerly used to test my OSes no longer has a working floppy drive, and has no CD-ROM drive. I can copy files across my LAN to it, but it doesn't support network booting either. So I'm limited to testing via Bochs on that machine now. Quote: PS: I for one am a fan of your work crc . Thank you! I like your work too. |
|||
12 Aug 2004, 20:32 |
|
ASHLEY4 12 Aug 2004, 22:22
So we keep rule 5) "The OS must run in BOCHS (any version, with any settings as long as they are provided) because it is the easy way to prove that OS runs in at least one hardware configuration."
Don't you just love democracy . Does any one else want to ? any of the rules or add some ?. What about none members, can they take part ?. .. Now were can i down load BOCHS at this time of night!. \\\\|//// (@@) ASHLEY4. |
|||
12 Aug 2004, 22:22 |
|
crc 13 Aug 2004, 11:11
Quote: Now were can i down load BOCHS at this time of night!. From http://bochs.sf.net of course Quote: Does any one else want to ? any of the rules or add some ? The only rule I dislike is #6: There is no limits to the used algorithms or data compression as long as decompressor fits within given limit. I feel that compression is cheating a little, because the compressed code doesn't really fit in 512 bytes without help... |
|||
13 Aug 2004, 11:11 |
|
Goto page 1, 2, 3, 4 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.