flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > I Have A Problem With Command Interpreter Goto page 1, 2, 3 Next |
Author |
|
Dexter 10 Jul 2004, 12:11
Look at the code
It's explained everything in the file
|
|||||||||||||||||||||
10 Jul 2004, 12:11 |
|
crc 10 Jul 2004, 14:01
Pesonally, I'd recommend scrapping the procedures and using normal routines + macros instead. Procs make the code more confusing than it actually needs to be IMO. Either way, good luck with this
|
|||
10 Jul 2004, 14:01 |
|
Gambino 11 Jul 2004, 14:35
Great it's working
We will see the first version very soon I will wait to see what Dexter says... Question Should i create a forum for this OS wannabe ? ( i can make a forum for this but it will not be even 60% up and running because of the internet connection ) Or posting here is fine ? |
|||
11 Jul 2004, 14:35 |
|
Gambino 11 Jul 2004, 20:35
Here Is The Very First Working Version...
Made By Dexter And Me crc can u replace the writestr procedure with your writestr macro ? The macro is much better because we don't need 0 terminated strings and we can pass the string directly
|
|||||||||||||||||||||
11 Jul 2004, 20:35 |
|
Gambino 12 Jul 2004, 05:03
This is the 3rd post and still no response....
Oh well here is the second release of XBIOC There is a new WriteStr procedure wich allows multiple attributes in a string and i added the blink feature too ( just add blink to the foreground color, you can view the full efect with the 'ver' command ) Type 'help' For A List Of Commands... Have Fun With This... And Tell Me What You Think... Ahhh....almost forgot, crc can u make a proc that converts a hex/integer value to string ?
Last edited by Gambino on 12 Jul 2004, 05:20; edited 1 time in total |
|||||||||||||||||||||
12 Jul 2004, 05:03 |
|
crc 12 Jul 2004, 05:14
I'm working on both things you asked for, just be patient -- I have a lot to do today
|
|||
12 Jul 2004, 05:14 |
|
Gambino 12 Jul 2004, 06:58
OK
Did u like the new version Encourage us to work more, tell us nice things about XBIOC Waiting for reply..... |
|||
12 Jul 2004, 06:58 |
|
pelaillo 12 Jul 2004, 13:26
This is good stuff !
Write a bootsector as loader for your command-liner and the OS can start kicking btw. This is going to work with STDIN, STDOUT, STDERR? btw2. There is a version without szStrings? |
|||
12 Jul 2004, 13:26 |
|
ASHLEY4 12 Jul 2004, 16:49
Nice work, have you seen this program?, its called "bootprog" it loads a com or exe from a floppy disk, just put your prog on a floppy and restart your pc and it will boot it. you can not use dos int as there is no dos, but you can use bios int.
I us it for my os testing and its the best prog i,v found. You can get it from here: http://alexfru.chat.ru/epm.html Its called "bootprog.zip" , just read the readme file and have fun ASHLEY4. |
|||
12 Jul 2004, 16:49 |
|
Gomer73 12 Jul 2004, 17:11
For printing out hex, you can use my routines in my vesa info prog(cv.asm) found on this forum.
print_dec.end_numb is where everything gets printed(including hex). print_hex prints a word, print_hex_big prints a dword. It prints it without lead zero, so 1 would be printed as 1 and not 00000001. Thanks to Bogdan for giving the hex convertor without using jmps, I modified it a bit to save an instruction or two. Here is the code though: print_dec_nc: push word 0 mov cx,1000 jmp print_dec.loop print_dec: push word 0 .zero_loop: mov cx,3 .loop: xor dx,dx mov bx,10 div bx or dl,30h push dx or ax,ax jz .end_numb loop .loop push word ',' jmp .zero_loop .end_numb: pop dx or dx,dx jz .end mov ah,2 int 21h jmp .end_numb .end: ret print_hex: push ax xor eax,eax pop ax print_hex_big: push word 0 .loop: push eax and al,0fh cmp al,10 cmc adc al,30h daa mov bl,al pop eax push bx shr eax,4 or eax,eax jz print_dec.end_numb jmp .loop |
|||
12 Jul 2004, 17:11 |
|
Gambino 13 Jul 2004, 14:18
Now me and Dexter we are working on a 'dir' command
So posting will delay a bit until we finish that... Also making the os wannabe to boot from floppy Gomer73 , i can't use that ! this is an os wannabe , we don't have int 21h (int 21h works only in DOS), i will modify how the routine prints. Quote: btw. This is going to work with STDIN, STDOUT, STDERR? pelaillo i will let Dexter answer those two... ( i don't know what STDIN,STDOUT,STDERR stands for... Silly Me ) ( szStrings ?!? hmmm... explain better i'm from Romania ) btw Nice screenshot |
|||
13 Jul 2004, 14:18 |
|
Dexter 13 Jul 2004, 19:24
if szStrings means zero terminated string
I ask you, what is the problem why do you whant to change it ? do you whant to calculate the size your self as for This is going to work with STDIN, STDOUT, STDERR? I don't understand explain better I am glad you liked our "console" |
|||
13 Jul 2004, 19:24 |
|
Gomer73 14 Jul 2004, 16:27
STDIN, STDOUT, STDERR stand for standard in, out, and error.
These are basically file handle type things. stdin usually comes from the keyboard, but you can "pipe" it from another file. stdout typically goes to the screen, but you can also "pipe" it to a file or the input of another file. same thing with stderr, handy if you only want the errors going to a log file. For my program it uses stdout, which is why I used the int 21 rather than the int 10. Unless you use the dos stuff, this would require significant programming, because you would need to create your own stream architecture. |
|||
14 Jul 2004, 16:27 |
|
Gambino 18 Jul 2004, 14:32
Sorry for not posting for so long, but we was bussy with exams...
In a few days we will continue to work on XBIOC... Btw we did make XBIOC boot from floppy ( That was a piece of cake ) Any idea how to find out how much RAM has a computer ? ( Found some ints but they are old and only report 64MB max so they are no good.... ) |
|||
18 Jul 2004, 14:32 |
|
Gambino 24 Jul 2004, 20:54
I see that everybody lost interest on this one....
Nobody is posting anymore... |
|||
24 Jul 2004, 20:54 |
|
crc 24 Jul 2004, 22:48
Just because no one is posting doesn't mean there is no interest. For me, I'm pretty busy with work (retail; we're starting to approach the holiday season) and am finishing up RetroForth 7.0; I'll continue to do some hacking on XBIOC in early August
|
|||
24 Jul 2004, 22:48 |
|
Gambino 26 Jul 2004, 07:09
OK Nice to hear that !!!
Some good news... did that 'how much ram a computer has' thingie ( 2 routines wich do the same thing... u will understand better when i will upload the latest release ) Also added 3 new (crappy, but useful) commands: Ram - Finally Made This... Displays Total Memory Reboot - Restarts The Computer (doh!) Shutdown - Turns Off Computer ( APM Power Off Command ) And 2 routines : Hex2Str converts hex value in str like : Input mov eax,1234FACEh (can be a var) Hex2Str,eax,string Output string db '1234FACEh',0 Dec2Str converts decimal value in str : idem Stay tuned for the new release.... Coming Soon |
|||
26 Jul 2004, 07:09 |
|
ASHLEY4 26 Jul 2004, 14:33
This is code for v2os command.com for pmode, int 20h is the int's for v2os like dos's int 21h.
Code: [BITS 32] ;Set code generation to 32 bit mode[ORG 0x0100] ;Set code start address to 0100h[SEGMENT .text] ;Main code segmentmain:mov ah, 46call clear_screencall welcome_msgjmp disp_promptwelcome_msg:mov al, 4mov edi, welcome_strint 0x20retdisp_prompt:mov al, 4mov edi, prompt_strint 0x20user_input:mov al, 40mov edi, input_strint 0x20call upper_casetest_input:;Begin test for directory commandmov esi, dir_test_strmov edi, input_strmov al, 30int 0x20test al, aljz dir_command;Begin test for reboot commandmov esi, reboot_strmov edi, input_strmov al, 30int 0x20test al, aljz reboot_command;Begin test for exit commandmov esi, exit_strmov edi, input_strmov al, 30int 0x20test al, aljz exit;Begin test for cls commandmov esi, cls_strmov edi, input_strmov al, 30int 0x20test al, aljz cls_command;Begin test for help commandmov esi, help_strmov edi, input_strmov al, 30int 0x20test al, aljz help_commandexecute_input:mov al, 4mov edi, temp_msgint 0x20jmp disp_promptreboot_command:mov al, 13int 0x20help_command:mov al, 4mov edi, help_msgint 0x20jmp disp_promptcls_command:mov ah, 46call clear_screenjmp disp_promptdir_command:mov al, 25mov edi, dirint 0x20jmp disp_promptupper_case:mov esi, input_strmov al, 31int 0x20retclear_screen:mov al, 4mov edi, blankint 0x20dec ahjnz clear_screenretexit:retf[SEGMENT .data] ;Initialised data segmentprompt_str: db 'A:\>',0temp_msg: db 'Bad command or file name',13,10,0dir: db 'files',0dir_test_str: db 'DIR',0exit_str: db 'EXIT',0reboot_str: db 'REBOOT',0cls_str: db 'CLS',0help_str: db 'HELP',0input_str: times 256 db 0blank: db ' ',13,10,0;temp_buff: times 255 db 0welcome_str: db 13,10,'ÛßßßßßßßßßßßßßßßßßßßßÛ',13,10 db 'Û Welcome to V2-DOS. Û',13,10 db 'Û Û',13,10 db 'Û by: Û',13,10 db 'Û Stalin Û',13,10 db 'ÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ',13,10,13,10,0help_msg: db 13,10,'ÛßßßßßßßßßßßßßßßßßßßßßßÛ',13,10 db 'Û dir: list files Û',13,10 db 'Û cls: clear screen Û',13,10 db 'Û exit: exit shell Û',13,10 db 'Û reboot: quick reboot Û',13,10 db 'ÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ',13,10,13,10,0 ASHLEY4. |
|||
26 Jul 2004, 14:33 |
|
Gambino 26 Jul 2004, 18:16
ASHLEY4
You posted on the wrong topic or i don't get it... What is this that code for ... It's a command interpreter like ours, but why did u post that code ? I don't see nothing helpful in that code and all those commands except 'dir' where already implemented in the version that will be released in a few days... P.S. Where is the source of the int20 ? |
|||
26 Jul 2004, 18:16 |
|
Goto page 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.