home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,230 of 2,978   
   Marco van de Voort to inflater   
   Re: Pascal GUI   
   30 Jul 06 12:54:35   
   
   From: marcov@stack.nl   
      
   On 2006-07-30, inflater  wrote:   
   >> Ok. So what exactly does e.g. MOS use from unit dos that is so specific that   
   >> you can't translate it to your own programming interface?   
   >>   
   >> If you have a floppy, you will have directories and ways of searching them,   
   >> so the standard file stuff should be implemented.   
   > The floppy is equpped with FAT12-EXE bootloader (so Kernel is written   
   > in Pascal) and the kernel works, if even in disassembly of the file are   
   > some "int 21h's".   
      
   That's odd. Maybe you still load dos (io.sys/msdos.sys, but not   
   command.com)?   
      
   You can test that by trying to write something to screen using int 21. If   
   that works, you still load (part of) dos.   
      
   > But it works and I cannot convert the EXE to a COM (I   
   > tried EXE2BIN, EXE2COFF and COFF2COM) but all failed.   
   > I develop the kernel in Borland Pascal 7   
      
   A com has a 64k small memory model (code+data=64k) iirc. Maybe it is   
   simply to big for the .com conversion.   
      
   > NOT Free Pascal! Why? Because   
   > Free Pascal uses DJ Delorie's DOS Extender and this doesn't work   
   > (executable wants CWSDPMI).   
      
   You don't need it. You can just make a flat ELF binary with a custom runtime   
   library and load it directly via the linux loader GRUB. That way you can   
   load large kernels. There are examples on the "contributed units" page at   
   the FPC site iirc. However going to protected mode has its advantages, but   
   also needs more skill to access the bios etc. Maybe it is better to save it   
   for the 2nd attempt, OTOH there are examples.   
      
   > I must learn how to manage memory in real-mode with BP7. I plan to make my   
   > own FS (if I fail to find FAT12 FS in Pascal [not C, because I worked with   
   > C 4 years ago and i have all forgotten] i use my filesystem.) The   
   > filesystem is a bit curious: On some cylinder will be "Program List" and   
   > "Users List", and the programs (COM without DOS fnc.) will be "tumbled"   
   > around the diskette   
      
   FAT 12 and 16 are not that complicated. You could try to create the code   
   from the descriptions on the net and test with a bit full diskette or an old   
   2nd HD.   
      
   >:)   
   > There is one problem:   
   > COM programs uses DOS function INT 20h to terminate.   
   > I must somehow in Pascal programm this to "far jump" to kernel but i   
   > dont know how.   
      
   Have a jump table somewhere at the start of the kernel on a fixed address.   
   Then jump to it indirectly.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca