Commit Graph

474 Commits

Author SHA1 Message Date
nickysn
a58dd988a4 * regenerate makefiles after the fpcmake update
git-svn-id: trunk@34002 -
2016-06-17 22:05:59 +00:00
pierre
a72434e93a Trial to clarify heap for i8086 issues:
- MSDOS heap in tinyheap.inc modified to use usual
  SysGetMem and similar names.
  - Use HAS_MEMORYMANAGER (used previously in wince source code,
  to specify that a memory manager is defined elsewhere than inside
  heap.inc include file.
  - Use
  - Remove TinyHeapMemoryManager Structure variable completely

  heaptrc.pp: remove unneeded macro code after name changes of tinyheap.inc

  msdos/system.pp now only defines HAS_MEMORYMANAGER macro
  win16/system.pp defines HAS_MEMORYMANAGER and FPC_NO_DEFAULT_HEAP
  as it still uses a different memory manager.
  __stkbottom variable added for win16 system.pp as it is required
  by i8086 specific stack check code.

git-svn-id: trunk@33983 -
2016-06-13 22:26:03 +00:00
Tomas Hajny
c1afb4b63b * avoid FindFirst failing due to Attribute parameter bigger than $FF
git-svn-id: trunk@33894 -
2016-06-03 21:16:35 +00:00
pierre
e4a9e0ceea * Fix compilation for msdos OS with -dSYSTEMDEBUG
git-svn-id: trunk@33717 -
2016-05-20 15:46:46 +00:00
pierre
01ea38a627 Implement basic SysOSAlloc using MSDOS Interrrupt 0x21, AH=0x48 function
git-svn-id: trunk@33676 -
2016-05-11 14:29:11 +00:00
pierre
2a3b5bec86 Add new FPC_NO_DEFAULT_MEMORYMANAGER define for msdos OS
git-svn-id: trunk@33675 -
2016-05-11 14:27:26 +00:00
nickysn
6d4dfb5595 * fixed compilation of sysutils on i8086-msdos after r33290
git-svn-id: trunk@33312 -
2016-03-21 21:09:27 +00:00
nickysn
759a4f8258 * don't try to build lnfodwrf on i8086-msdos, because it causes internal error
200309041 and thus breaks building i8086-msdos snapshots entirely. Added test
  that reproduces the bug in a small program, so it can be fixed eventually.

git-svn-id: trunk@33276 -
2016-03-18 19:56:37 +00:00
nickysn
5aa8392e05 * i8086-msdos compilation fixed
git-svn-id: trunk@33043 -
2016-02-04 08:45:20 +00:00
pierre
3c88a3c59b Use Tiny getmem/freemem functions for systemdebug code, add more debug output
git-svn-id: trunk@32949 -
2016-01-16 00:50:30 +00:00
pierre
3bf9019676 + Define FPC_ANSI_TEXTFILEREC to avoid unnecessary use of unicode char
+ Add possibility to disable FEATURE_WIDESTRINGS by
 setting conditional NO_WIDESTRINGS
 + Add ifndef RTLLITE around LFN code

git-svn-id: trunk@32948 -
2016-01-16 00:42:36 +00:00
nickysn
79c5b632f1 + added portl class for 32-bit port access in the i8086-msdos ports unit, if
the target cpu is 386 or later

git-svn-id: trunk@32929 -
2016-01-12 18:06:21 +00:00
nickysn
72dc92e8b8 * added 'word ptr' overrides, to avoid generating 32-bit instructions (due to a
bug in the i8086 internal assembler reader, which will be fixed later)

git-svn-id: trunk@32872 -
2016-01-07 15:40:47 +00:00
nickysn
05a3a91d19 * fixed msdos cross compiler compilation with "make -j2"
git-svn-id: trunk@32354 -
2015-11-17 19:30:57 +00:00
florian
70b8789262 o basic extended pascal support:
+ automatically loaded helper unit
  * Makefiles adapted
  * mode switch
  * mode switches reorganized
+ TimeStamp support

git-svn-id: trunk@32330 -
2015-11-15 15:13:36 +00:00
michael
fde42ca8ef * Type helpers, compatible to Delphi XE 8
git-svn-id: trunk@32262 -
2015-11-07 09:40:54 +00:00
nickysn
20e5b3e586 * handle empty environment correctly when initializing argv0 under msdos.
Patch by Max Nazhalov, mantis #28705.

git-svn-id: trunk@32028 -
2015-10-12 17:59:51 +00:00
nickysn
ace95e550b * initialize argc and argv on i8086-msdos. This fixes paramcount and paramstr
in objfpc mode on this platform (mantis #28705)
+ support quoted parameters like the go32v2 target

git-svn-id: trunk@32018 -
2015-10-11 17:38:45 +00:00
nickysn
4454332d7a * fixed the sysutils.GetEnvironment* functions for i8086-msdos
- removed the envp variable from the msdos system unit, because it's not
  compatible with ppchar in all memory models (we use ppfarchar to avoid copying
  the environment in the program's data segment in near data memory models)

git-svn-id: trunk@32017 -
2015-10-11 13:23:59 +00:00
nickysn
239fc27c38 + implemented sysutils.diskfree and sysutils.disksize for i8086-msdos
git-svn-id: trunk@31905 -
2015-10-01 15:25:13 +00:00
nickysn
12f49eb280 * fixed getting the current locale's ansi upper case table under i8086-msdos
git-svn-id: trunk@31904 -
2015-10-01 15:05:33 +00:00
nickysn
2e3cb70489 * regenerated makefiles after adding the win16 target
git-svn-id: trunk@31525 -
2015-09-05 11:02:54 +00:00
nickysn
1264eaf8c6 * fixed "nil pointer assignment" error in huge memory model
git-svn-id: trunk@31502 -
2015-09-03 22:37:01 +00:00
nickysn
63f86ee6a5 + huge memory model fixes in the i8086-msdos startup code
git-svn-id: trunk@31501 -
2015-09-03 22:08:53 +00:00
nickysn
4061628ffb * the i8086-msdos default code segment (in near code memory models) renamed
'_TEXT'. This name is used in object modules, produced by Borland C and Open
  Watcom.

git-svn-id: trunk@31482 -
2015-09-02 13:14:12 +00:00
nickysn
a3dd5c7c17 * set stack alignment to 16 in the msdos startup code
git-svn-id: trunk@31397 -
2015-08-24 19:58:08 +00:00
nickysn
5dc42404cf * capitalize omf segment class names, as that's how other 16-bit compilers write them
git-svn-id: trunk@31371 -
2015-08-22 19:07:04 +00:00
nickysn
1643c5f073 * also capitalize 'DGROUP' in the msdos startup code as well after r31369
git-svn-id: trunk@31370 -
2015-08-22 18:56:36 +00:00
nickysn
536346a441 * use 'dw' instead of 'dd' to reference the stack, in order to prevent nasm from
generating a 32-bit fixup record

git-svn-id: trunk@31353 -
2015-08-20 21:51:23 +00:00
nickysn
3ee0fc22d9 * use 'dw' instead of 'dd' to reference the heap from the i8086-msdos startup
code, because 'dd' causes nasm to emit a 32-bit OMF relocation entry, which
  we won't support (at least initially) in our internal linker

git-svn-id: trunk@31345 -
2015-08-19 14:33:56 +00:00
Jonas Maebe
89418d23e5 * regenerated Makefiles with Linux/AArch64 support
git-svn-id: trunk@30891 -
2015-05-20 20:15:10 +00:00
nickysn
5a1ce6162b * set the bss, rodata and rodata_norel section alignment to 2 bytes for the i8086-msdos target
git-svn-id: trunk@30680 -
2015-04-20 01:27:26 +00:00
nickysn
a69b98484e + enabled compilation of unit lnfodwrf on i8086-msdos
git-svn-id: trunk@30637 -
2015-04-18 01:56:04 +00:00
nickysn
930327eabf * fixed a race condition during parallel build, when nasm tries to create the
output file, before mkdir has created the output directory

git-svn-id: trunk@30148 -
2015-03-08 13:32:35 +00:00
nickysn
e513cd44cf * cleaned up, fixed dependencies and enabled parallel build in the msdos makefile
git-svn-id: trunk@30145 -
2015-03-08 12:31:58 +00:00
Tomas Hajny
db7a9950d1 * unit name changed to System (starting with uppercase 'S') for improved compatibility to Delphi - see test tobject5.pp
git-svn-id: trunk@30025 -
2015-02-27 19:00:50 +00:00
Jonas Maebe
fa328436ab * regenerated for iphonesim/x86-64
git-svn-id: trunk@29974 -
2015-02-23 22:56:41 +00:00
Jonas Maebe
3d01d4ceb1 * regenerated with Darwin/AArch64 support
git-svn-id: trunk@29950 -
2015-02-23 22:54:53 +00:00
marco
d407b668d1 * version updated to 3.1.1
git-svn-id: trunk@29399 -
2015-01-04 21:09:04 +00:00
pierre
7bbb30ccd4 * Reset filerec mode field to fmClosed if the system call to open the file failed
git-svn-id: trunk@29132 -
2014-11-23 21:49:29 +00:00
sergei
3a5e6485b5 - RTL: removed InitVariantManager, it was an empty procedure since day 1.
git-svn-id: trunk@29114 -
2014-11-22 20:35:46 +00:00
nickysn
8edfd33af8 * use RegisterTinyHeapBlock_Simple_Prealigned in the msdos rtl
git-svn-id: trunk@28652 -
2014-09-13 19:55:55 +00:00
nickysn
c8e9d2cf6e + added a simplified version of RegisterTinyHeapBlock, for use when the tiny
heap is a single memory block

git-svn-id: trunk@28635 -
2014-09-09 12:45:47 +00:00
nickysn
45ed066fed * fixed SysUtils.FindFirst/FindNext/FindClose on i8086-msdos in the compact and
large memory models by changing TSearchRec.FindHandle to a pointer (because
  THandle is 16-bit on this platform and is thus not able to hold a far pointer
  without truncating it)

git-svn-id: trunk@28451 -
2014-08-18 21:39:20 +00:00
nickysn
7958466ef9 * on i8086-msdos, in the compact and large memory models, set the end of heap to
be the end of the current program's MCB, instead of 16 bytes earlier

git-svn-id: trunk@28442 -
2014-08-18 13:54:20 +00:00
nickysn
9979aa702f + added the TP7-compatible pointer variables HeapOrg and HeapEnd, indicating,
respectively, the start and end of the tiny heap. Eventually they are also
  going to be used for catching attempts to free memory that is outside the
  heap.

git-svn-id: trunk@28437 -
2014-08-17 22:42:44 +00:00
nickysn
a61c775d29 + enabled the huge (>64kb) heap support in the compact and large memory models
git-svn-id: trunk@28349 -
2014-08-08 23:32:12 +00:00
nickysn
b1144508a7 * fixed the far/huge data ifdefs in InitDosHeap
git-svn-id: trunk@28348 -
2014-08-08 21:44:19 +00:00
nickysn
ace28a3552 * InitNearHeap procedure renamed InitDosHeap and added support for a huge heap.
Startup code still needs to be updated in order to enable >64kb heap.

git-svn-id: trunk@28334 -
2014-08-07 22:00:24 +00:00
nickysn
f7dd4f640a - rm the 'Memory allocation error' and 'Not enough memory' error messages from
the compact and large model startup code, since they're not used (we rely on
  the DOS loader to check for the available memory instead)

git-svn-id: trunk@28069 -
2014-06-25 23:16:55 +00:00
nickysn
ba5ececab9 * i8086 far data memory model fixes in the int 0 (div by zero) handler
git-svn-id: trunk@28062 -
2014-06-25 16:46:58 +00:00
nickysn
e7e02467fc * fixed bug in MsDos and Intr in i8086 far data memory models not cleaning their
parameters from the stack properly (leaving an extra word on the stack)

git-svn-id: trunk@28059 -
2014-06-25 12:33:03 +00:00
nickysn
23b0cf2340 * msdos system unit variable dos_psp renamed PrefixSeg for TP7 compatibility
git-svn-id: trunk@28047 -
2014-06-24 10:58:59 +00:00
nickysn
1910177cf0 + added heapmax support to the $M directive on i8086-msdos. It is currently
only implemented in the near data memory models. The far data models support
  is still a TODO.

git-svn-id: trunk@28039 -
2014-06-23 20:17:17 +00:00
nickysn
95449a3fd4 * fixed yet another dos_psp<>dgroup bug in the startup code for .exe files in
the tiny memory model

git-svn-id: trunk@28033 -
2014-06-22 20:12:55 +00:00
nickysn
3164a10d9d * fixed a bug in the startup code for tiny memory model, which caused the
program MCB address not to be calculated correctly, when the program is a tiny
  model .exe file, leading to possible memory corruption. Previously, the code
  assumed that dos_psp=CS, but that's only true for tiny .com files; tiny .exe
  files have a 256-byte gap between dos_psp and CS.

git-svn-id: trunk@28032 -
2014-06-22 11:06:57 +00:00
nickysn
cd6b15f49a * slight optimization to the small and medium model startup code
git-svn-id: trunk@28031 -
2014-06-22 09:42:30 +00:00
nickysn
1295b4abf7 - removed the call to CheckNullArea from the exit code for the tiny memory model
git-svn-id: trunk@28006 -
2014-06-19 21:47:46 +00:00
nickysn
7cfd7a66cd + create a special 'heap' segment with reserved space equal to heapsize (i.e.
the value set by -Ch or the second parameter to the $M directive). This is
  equivalent to the heapmin value in Turbo Pascal 7 and ensures that the program
  has at least this amount of heap space available (otherwise DOS will show a
  'not enough memory' error and will refuse to load the program).

git-svn-id: trunk@28002 -
2014-06-19 14:14:01 +00:00
nickysn
2dc8839af5 * set class=data to all data segments/sections on i8086
git-svn-id: trunk@27957 -
2014-06-14 16:01:22 +00:00
nickysn
8ad63788c7 - do not emit a stack segment in the tiny memory model
- rm the reference to the top of the stack segment from the startup code in tiny
  model

git-svn-id: trunk@27956 -
2014-06-14 15:56:44 +00:00
nickysn
73d7f2aa18 * let the compiler generate the stack segment in i8086 near data memory models
as well. Even though, in these models, the stack is dynamically allocated
  (because it goes on top of the heap, but the heap is variable size), there are
  still benefits:
  1) the program will run on a larger stack during initialization, before the
     actual stack (and heap) are ready
  2) in cases, when the system is extremely low on memory, DOS will reject to
     load the program if there's not enough memory for the stack the program
     requires. This way the startup code can be further simplified by omitting
     the 'not enough memory' check in the future (when we add the minimum heap
     size to the executable reserved space as well).

git-svn-id: trunk@27903 -
2014-06-08 21:14:57 +00:00
nickysn
d4565aeec2 * in i8086 far data memory models add reference to the beginning of stack from
the startup code, so the object module, containing the stack segment doesn't
  get smartlinked away

git-svn-id: trunk@27824 -
2014-05-29 14:57:48 +00:00
nickysn
3cc8ff11e3 + generate the stack segment for i8086 far data memory models from within fpc
itself (instead of having a fixed 16k stack in the startup code). This allows
  setting the stack size in these models with the -Cs option.

git-svn-id: trunk@27820 -
2014-05-27 23:29:50 +00:00
Tomas Hajny
cedf009d3c * fix for SIGSEGV in Exec without command line parameters revealed in discussion for #26160
git-svn-id: trunk@27804 -
2014-05-18 20:37:40 +00:00
pierre
3d34a8a3b0 Makefiles updated with fpcmake rev 27428
git-svn-id: trunk@27508 -
2014-04-10 09:58:17 +00:00
nickysn
626000e50d + added System.SelectorInc to the msdos rtl (BP7 compatibility)
git-svn-id: trunk@27497 -
2014-04-07 08:26:53 +00:00
nickysn
f31d7e665b * fix for i8086 far data memory models in dos.getintvec
git-svn-id: trunk@27468 -
2014-04-04 17:03:18 +00:00
nickysn
8efd857d76 * i8086 far data memory model fixes in unit msmouse
git-svn-id: trunk@27462 -
2014-04-04 08:57:14 +00:00
nickysn
34e8e5a0dc * handle zero length strings correctly in DebugWrite/DebugWriteLn
git-svn-id: trunk@27459 -
2014-04-03 21:47:42 +00:00
pierre
fcc7dc82fc Fix typo error in previous fpcmake.ini change
git-svn-id: trunk@27428 -
2014-04-01 15:38:27 +00:00
pierre
2161b5e2e4 Fix syntax error in previous fpcmake.ini change
git-svn-id: trunk@27426 -
2014-04-01 15:31:12 +00:00
pierre
7b28fb4c0e Makefile update to suppport use of -sh option
git-svn-id: trunk@27425 -
2014-04-01 15:26:28 +00:00
pierre
8f9268d808 Add missing EXECPPAS for explicit COMPILER calls, needed for -sh option
git-svn-id: trunk@27422 -
2014-04-01 15:12:30 +00:00
nickysn
e4d4dd9d81 * replaced tabs with spaces, fixes identation
git-svn-id: trunk@27419 -
2014-04-01 12:46:46 +00:00
nickysn
85c6ffa102 * setup a true far data memory layout in the compact and large models with
stack, heap and static data being all in different segments

git-svn-id: trunk@27418 -
2014-03-31 22:03:48 +00:00
nickysn
e4437bcd51 + initialize the segment of __stktop, __stkbottom, __nearheap_start and
__nearheap_end in i8086 far data memory models.
+ 'Hello world!' now works in the i8086 compact and large memory models!

git-svn-id: trunk@27377 -
2014-03-30 15:32:44 +00:00
nickysn
381d09d03f + added extra_data_offset constant, similar to extra_param_offset but for data
pointer size fixups

git-svn-id: trunk@27356 -
2014-03-29 21:43:09 +00:00
nickysn
4eeff66922 + compact and large memory model support added to the MsDos and Intr procedures
git-svn-id: trunk@27354 -
2014-03-29 21:28:57 +00:00
marco
959ea7f5bb * printer unit moved. Amiga unit also moved but it is not actively used.
git-svn-id: trunk@27351 -
2014-03-29 20:35:28 +00:00
marco
c465d3d64a * moving 4 cp9* units. These are 16-bit and big.
git-svn-id: trunk@27349 -
2014-03-29 19:43:13 +00:00
marco
ed3a49372d * strutils moved to packages/rtl-objpas
git-svn-id: trunk@27339 -
2014-03-29 17:51:44 +00:00
nickysn
4a649c9b08 + i8086 far data memory model support in DebugWrite
git-svn-id: trunk@27265 -
2014-03-24 16:51:38 +00:00
nickysn
32c3f4e682 + added cld to DebugWrite
git-svn-id: trunk@27264 -
2014-03-24 15:41:29 +00:00
nickysn
25be2bc720 * define macros identifying the code and data model in each of the memory models
git-svn-id: trunk@27263 -
2014-03-24 14:02:57 +00:00
nickysn
0236c2823a + added startup modules for compact, large and huge model that define the
memory model and include the common startup code prt0comn.asm (which is not
  yet adapted for the new models, but eventually will be)

git-svn-id: trunk@27262 -
2014-03-24 13:42:42 +00:00
nickysn
f4c463b6bd * prt0stm.asm renamed prt0comn.asm, as it will probably be used as the common
startup code for all memory models and not just for small, tiny and medium

git-svn-id: trunk@27261 -
2014-03-24 13:23:36 +00:00
nickysn
b7d759344d * fixed do_filepos and do_seekend not returning the high 16 bits of the file
offset correctly

git-svn-id: trunk@27176 -
2014-03-17 22:01:09 +00:00
nickysn
d989a42111 * several local variables changed from longint to integer
git-svn-id: trunk@27175 -
2014-03-17 21:58:53 +00:00
nickysn
517f802ccc * revert to the initial implementation of GetCommandLine as the code generator
bug mentioned in the comment has been fixed

git-svn-id: trunk@27173 -
2014-03-17 20:33:32 +00:00
nickysn
238c4f91d8 * fixed dos.getftime returning a wrong value for 'time' on i8086-msdos
git-svn-id: trunk@27159 -
2014-03-16 15:22:49 +00:00
nickysn
ee34761646 * changed some longint vars to integer and cleaned up some unused vars from the
msdos dos unit.

git-svn-id: trunk@27158 -
2014-03-16 13:55:00 +00:00
nickysn
ac6611ceb9 - rm unused variable from LFNFindFirst
git-svn-id: trunk@27157 -
2014-03-16 12:46:04 +00:00
nickysn
044a744ba8 + implemented dos.SwapVectors for i8086-msdos
git-svn-id: trunk@27156 -
2014-03-16 12:37:52 +00:00
nickysn
07c3762164 + ported the go32v2 CD-ROM support code for dos.disksize and dos.diskfree to
i8086-msdos

git-svn-id: trunk@27155 -
2014-03-16 12:23:22 +00:00
nickysn
41d28f91e5 - rm asmmode intel from the i8086-msdos rtl, as that is the default asm mode on
that platform

git-svn-id: trunk@27144 -
2014-03-15 13:01:05 +00:00
nickysn
2425eb243a * DebugWrite and DebugWriteLn moved to the implementation part of the system
unit. No need to expose them anymore, as the regular Write/WriteLn have been
  quite stable on i8086-msdos for a long time now.

git-svn-id: trunk@27143 -
2014-03-15 12:31:01 +00:00
sergei
3a55c4301e * Since StackTop=StackBottom+StackLength, any two variables are sufficient to describe stack, the third one is redundant.
* As a first part of cleanup, replaced StackTop with function returning StackBottom+StackLength.
* On Win32 and Win64, StackTop returns the stack base from TIB instead.

git-svn-id: trunk@27119 -
2014-03-12 19:48:03 +00:00
nickysn
fec4c6a6e2 * various rtl fixes that allow objpas.integer to be 16-bit on 16-bit targets
(still not sure if it's a good idea, but trying, at least, is harmless - we
  can always rollback to integer being equal to longint)

git-svn-id: trunk@26966 -
2014-03-06 01:10:18 +00:00
nickysn
90c04fef80 + added nil pointer assignment test at the end of program for i8086-msdos
(works only for small and medium memory model)

git-svn-id: trunk@26888 -
2014-02-26 19:28:57 +00:00
nickysn
be879dde19 * added align=16 to the _NULL segment to ensure it's always located at DS:0000
git-svn-id: trunk@26883 -
2014-02-26 00:32:54 +00:00
nickysn
2fd09437e9 + added segment _null, belonging to group dgroup and class BEGDATA with the
hexadecimal pattern 01 in order to help catch storing data at location 0
  (this is compatible with Open Watcom's C library)

git-svn-id: trunk@26866 -
2014-02-24 14:01:44 +00:00
yury
73c26bd6be * mipsel-android: Regenerated makefiles. From now the mipsel-android target can be built and used.
git-svn-id: trunk@26705 -
2014-02-07 12:37:17 +00:00
Tomas Hajny
be6fdf21ce + character sets for central Europe added also to Makefiles as implicit units
git-svn-id: trunk@26527 -
2014-01-20 00:23:36 +00:00
pierre
f4726e068b Avoid assmebler size mismatch warning in Keep procedure
git-svn-id: trunk@26496 -
2014-01-17 23:33:24 +00:00
marco
dea2c743d5 * Initial active version of
rtl-extra : objects matrix ucomplex
   rtl-objpas: convutil(s) dateutil(s) stdconvs variants varutils
   

git-svn-id: trunk@26398 -
2014-01-05 19:20:15 +00:00
paul
14a34239cc rtl: add cp856 to makefiles
git-svn-id: trunk@26387 -
2014-01-05 06:03:28 +00:00
marco
a001e12d04 * rtl-console initial version.
git-svn-id: trunk@26372 -
2014-01-03 22:19:02 +00:00
marco
ebe262762a * Clean out of $i textrec and filerec includes that are redundant now that cpstrrtl exposes
those records via system. 

git-svn-id: trunk@26356 -
2014-01-02 13:26:09 +00:00
nickysn
180ddf2ddd + i8086 FPU detection code updated to also identify the FPU type (8087/287/387+)
and initialize the Test8087 global variable.

git-svn-id: trunk@26200 -
2013-12-08 20:50:52 +00:00
nickysn
3eeb422abe * use $(NASM) to compile the asm loaders. Fixes mantis #25223.
git-svn-id: trunk@26099 -
2013-11-16 13:05:55 +00:00
nickysn
fcd079db3d - rm the ss: prefix from the references, relative to bp (for them ss is the default)
git-svn-id: trunk@26081 -
2013-11-13 17:36:59 +00:00
nickysn
318a79cda7 * added a cld instruction in the int 0 handler
git-svn-id: trunk@26080 -
2013-11-13 17:08:39 +00:00
nickysn
9bfb25ff4c * use a far jmp to FPC_HANDLEERROR in far code memory models
git-svn-id: trunk@26075 -
2013-11-13 00:42:47 +00:00
nickysn
b6c02c651f * use %ifdef __FAR_CODE__ instead of %ifdef __MEDIUM__ in the int 0 handler (for
compatibility with future memory models)

git-svn-id: trunk@26074 -
2013-11-13 00:40:12 +00:00
nickysn
06c5acf69a + added division by zero exception handling for i8086-msdos
git-svn-id: trunk@26073 -
2013-11-12 22:05:05 +00:00
nickysn
af91346830 + added exeinfo to the implicitunits list in the makefile for i8086-msdos
git-svn-id: trunk@25865 -
2013-10-27 14:23:31 +00:00
nickysn
8066d12c87 * fixed the stack traces under i8086-msdos (StackTop wasn't initialized)
git-svn-id: trunk@25863 -
2013-10-27 13:53:16 +00:00
nickysn
28c16f31e6 * __stkbottom, __nearheap_start and __nearheap_end moved to the implementation
part of the system unit for i8086-msdos

git-svn-id: trunk@25862 -
2013-10-27 13:28:58 +00:00
nickysn
4646884d87 + enabled compilation of unit ctypes for i8086-msdos
git-svn-id: trunk@25858 -
2013-10-26 22:26:42 +00:00
nickysn
b73252bd3d + enabled compilation of the code page units for i8086-msdos
git-svn-id: trunk@25731 -
2013-10-09 23:39:36 +00:00
nickysn
a0af28a8fa + enabled compilation of unit fmtbcd for i8086-msdos
git-svn-id: trunk@25697 -
2013-10-06 16:55:52 +00:00
nickysn
009037f9d9 * the Seg0040, SegA000, SegB000 and SegB800 constants changed to typed constants
for Borland Pascal 7 compatibility. This allows doing e.g. 'mov es, [SegA000]'
  in inline asm, which is BP7 compatible, but would produce a wrong result
  if SegA000 was an untyped constant.

git-svn-id: trunk@25674 -
2013-10-06 09:07:55 +00:00
nickysn
8574642a1f + added and enabled compilation of unit printer for i8086-msdos
git-svn-id: trunk@25670 -
2013-10-06 00:14:08 +00:00
nickysn
0c2e8db579 + enabled compilation of unit charset for i8086-msdos
git-svn-id: trunk@25669 -
2013-10-05 23:55:34 +00:00
nickysn
1bea98995b * regenerated fpcmake makefiles after r25642
git-svn-id: trunk@25644 -
2013-10-05 10:11:27 +00:00
nickysn
8f8bd8b12d - rm the unnecessary jnz instruction before the rep stosb in the i8086-msdos startup code, because the rep prefix checks for cx=0 and skips the stosb instruction anyway
git-svn-id: trunk@25638 -
2013-10-04 13:36:24 +00:00
nickysn
608a449c4a + added a 'cld' before the first string x86 instruction in the i8086-msdos startup code
git-svn-id: trunk@25635 -
2013-10-04 11:18:47 +00:00
nickysn
e2903ded95 + added CGA snow checking to the WriteChar routine of the CRT unit for i8086-msdos; scrolling and clreol still produces snow
git-svn-id: trunk@25527 -
2013-09-21 13:40:21 +00:00
nickysn
408f53fbda + detect whether CGA snow checking is required and initialize the CheckSnow variable accordingly
git-svn-id: trunk@25491 -
2013-09-16 00:01:36 +00:00
nickysn
d2c2193505 + 83/84-key keyboard support added to unit keyboard for i8086-msdos
git-svn-id: trunk@25490 -
2013-09-15 19:53:24 +00:00
nickysn
034f9c6b71 + added and implemented unit keyboard for i8086-msdos, based on the go32v2 version of the unit
git-svn-id: trunk@25489 -
2013-09-15 17:48:35 +00:00
nickysn
5c1fb7b009 * Crt.CursorOff fixed after r25483; the correct value of CX is 2000h, not 200h
git-svn-id: trunk@25487 -
2013-09-14 15:39:07 +00:00
nickysn
19d6d202cd * Crt.CursorOn and CursorBig: use CX values that are CGA compatible, which makes them CGA/EGA/VGA compatible, because EGA/VGA bioses emulate CGA cursor values; as a side effect this also makes these functions work properly under EGA/VGA's 43- and 50-line text modes
git-svn-id: trunk@25484 -
2013-09-14 13:28:40 +00:00
nickysn
e60c3ee740 * Crt.CursorOff: use CX=bash200, instead of CX= for making the cursor invisible; this is the correct value, according to the BIOS documentation I've found and it is also the value used by the go32v2 video unit
git-svn-id: trunk@25483 -
2013-09-14 12:58:38 +00:00
nickysn
7e6092c4f2 * ScreenWidth and ScreenHeight changed to word; several other types also changed to 16-bit and added typecasts to avoid 32-bit calculations due to mixing signed and unsigned 16-bit ints
git-svn-id: trunk@25477 -
2013-09-13 08:31:53 +00:00
nickysn
70937d93c1 * WinMinX, WinMinY, WinMaxX and WinMaxY helper functions replaced with absolute packed records overlaid on top of WindMin and WindMax for faster access
git-svn-id: trunk@25474 -
2013-09-12 23:39:56 +00:00
nickysn
6ef912a7a0 * GetScreenCursor (and all places where it's called) var parameters changed to smallint, which is more optimal on i8086
git-svn-id: trunk@25455 -
2013-09-11 14:51:59 +00:00
nickysn
771301d7db * SetScreenCursor parameters changed to smallint, which is more optimal on i8086
git-svn-id: trunk@25454 -
2013-09-11 14:40:26 +00:00
nickysn
987e759e20 * WinMinX, WinMinY, WinMaxX and WinMaxY helper functions changed to return 0 based result, which results in slightly more optimal code in a lot of places
git-svn-id: trunk@25453 -
2013-09-11 14:18:30 +00:00
nickysn
e7cbd41670 - rm redundant double initialization of regs.cx from Crt.CursorOn
git-svn-id: trunk@25446 -
2013-09-10 15:27:06 +00:00
nickysn
76cbda0983 + 83/84-key keyboard support added to unit crt
git-svn-id: trunk@25445 -
2013-09-09 20:55:08 +00:00
nickysn
766b7745bd * counter variable in CrtWrite changed to SmallInt in order to generate more efficient code on the 16-bit i8086
git-svn-id: trunk@25444 -
2013-09-09 12:29:13 +00:00
nickysn
5ffca2e66f * CrtOpen, CrtClose, CrtRead, CrtWrite and CrtReturn changed to procedures, instead of functions
git-svn-id: trunk@25442 -
2013-09-08 21:22:40 +00:00
Jonas Maebe
de56f909d5 * synchronized with trunk up to and including r25430
git-svn-id: branches/cpstrrtl@25431 -
2013-09-06 10:09:26 +00:00
nickysn
e342c11085 + introduced a private type TCodePtrList, which is the specialization
TFPGList<CodePointer> on archs/memory models where CodePointer is different
  than Pointer. On archs/memory models where CodePointer = Pointer, TCodePtrList
  is simply an alias of TList and the fgl unit isn't pulled in.
* the type of FindGlobalComponentList changed to TCodePtrList and the typecasts
  from TFindGlobalComponent (procvar type) to Pointer changed to CodePointer.
  This fixes compilation of unit classes in the i8086 medium memory model.

git-svn-id: trunk@25357 -
2013-08-23 19:25:51 +00:00
Jonas Maebe
af3f12f60c * rawbytestring/unicodestring versions of findfirst/findnext/findclose
o these routines are now generic wrappers in filutil.inc, and call
     the platform-dependent internalfindfirst/next/close routines
   o on unix, the fnmatch routine got proper support for UTF-8 matching
     (e.g., it won't match a partial UTF-8 code point to a "?" wildcard)
   o for NativeNT, a similar (untested) UTF-16 version has been added
  + test for the above
  * rawbytestring/unicodestring versions of fileage

git-svn-id: branches/cpstrrtl@25302 -
2013-08-19 22:04:25 +00:00
Jonas Maebe
8d1090269e * synchronised with trunk r25259
git-svn-id: branches/cpstrrtl@25267 -
2013-08-16 11:33:44 +00:00
florian
b29591ffd3 * fix msdos rtl makefile for newer makes
git-svn-id: trunk@25240 -
2013-08-11 16:12:43 +00:00
Jonas Maebe
29132f45b7 * synchronised with trunk up to r25167 (fixes glib compilation via r25164,
and occasional crashes in executeprocess on libc platforms via r25167)

git-svn-id: branches/cpstrrtl@25169 -
2013-07-24 14:24:49 +00:00
Jonas Maebe
df6a2dce00 + unicodestring support for assign/erase/rename
+ codepage support for textrec/filerec and the above routines
  * textrec/filerec now store the filename by default using widechar. It is
    possible to switch back to ansichars using the FPC_ANSI_TEXTFILEREC define.
    In that case, from now on the filename will always be stored in
    DefaultFileSystemEncoding
  * fixed potential buffer overflows and non-null-terminated file names in
    textrec/filerec
  + dodirseparators(pwidechar), changed the dodirseparators(pchar/pwidechar)
    parameters into var-parameters and gave those routines an extra parameter
    that indicates whether the p(wide)char can be changed in place if
    necessary or whether a copy must be made first (avoids us having to make
    all strings always unique everywhere, because they might be changed on
    some platforms via a pchar)
  * do_open/do_erase/do_rename got extra boolean parameters indicating whether
    the passed pchars point to data that can be freely changed (to pass on to
    dodirseparators() if applicable)
  * objects.pp: force assign(pchar) to be called, because
    assign(array[0..255]) cannot choose between pchar and rawbytestring
    versions (and removing the pchar version means that assign(pchar) will
    be mapped to assign(shortstring) in {$h-})
  * fixed up some routines in other units that depend on the format of
    the textrec/filerec.name field

git-svn-id: branches/cpstrrtl@25137 -
2013-07-19 16:30:51 +00:00
Jonas Maebe
155aafc255 * moved SYSUTILS_HAS_ANSISTR/UNICODESTR_FILEUTIL_IMPL define to interface
so declarations can also depend on it and similar defines (not yet the
    case)
  + added SYSUTILS_HAS_ANSISTR_ENVVAR_IMPL/SYSUTILS_HAS_UNICODESTR_ENVVAR_IMPL
    to indicate whether the platform-dependent part of the unit provides
    an ansistring/unicodestring interface to get environment variables
  + Windows version of getenvironmentvariable(unicodestring)
  + generic ansistring/unicodestring versions of GetEnvironmentVariable()
    in case the platform doesn't provide them
  * result of GetEnvironmentString() is ansistring/unicodestring depending
    on the state of the FPC_RTL_UNICODE define

git-svn-id: branches/cpstrrtl@25116 -
2013-07-16 14:16:34 +00:00
Jonas Maebe
eeb98a0c0f - removed platform-specific implementations of GetCurrentDir, SetCurrentDir,
CreateDir and RemoveDir, and implemented a generic one (based on the OS/2
    version) in the shared sysutils code (so that the filesystem code page
    support for the system unit routines can be reused)
  * include both ansistring and unicodestring versions of the above routines,
    and of ForceDirectories. Exception: GetCurrentDir, which cannot be
    overloaded based on function result and whose return type currently
    dependends on the FPC_UNICODE_RTL define

git-svn-id: branches/cpstrrtl@25113 -
2013-07-16 14:15:55 +00:00
Jonas Maebe
26b2149ced * converted the following sysutils routines to unicodestring and
rawbytestring: FileExists, DirectoryExists, FileSetDate, FileGetAttr,
    FileSetAttr, DeleteFile, RenameFile, FileSearch, ExeSearch,
    FileIsReadOnly

git-svn-id: branches/cpstrrtl@25078 -
2013-07-09 19:01:45 +00:00
Jonas Maebe
60365489e2 * converted fileopen/filecreate interface to RawByteString for
msdos/embedded, but do not perform any code page conversions
    (size limits prevent widestring manager on msdos, and the
     embedded routines are empty)

git-svn-id: branches/cpstrrtl@25076 -
2013-07-09 19:01:36 +00:00
Jonas Maebe
d66d15aad3 + added mkdir/chdir/rmdir(rawbytestring) and (unicodestring) to the system unit
* renamed platform-specific pchar versions of those rouines to do_*() and
    changed them to either rawbytestring or unicodestring depending on the
    FPCRTL_FILESYSTEM_SINGLE_BYTE_API/FPCRTL_FILESYSTEM_TWO_BYTE_API setting
  * implemented generic shortstring versions of those routines on top of either
    rawbytestring or unicodestring depending on the API-kind (in case of the
    embedded target, if ansistring are not supported they will map directly
    to shortstring routines instead)
  * all platform-specific *dir() routines with rawbytestring parameters now
    receive their parameters in DefaultFileSystemCodePage
  - removed no longer required ansistring variants from the objpas unit
  - removed no longer required FPC_SYS_MKDIR etc aliases
  * factored out empty string and inoutres<>0 checks from platform-specific
    *dir() routines to generic ones
  o platform-specific notes:
   o amiga/morphos: check new pathconv(rawbytestring) function
   o macos TODO: convert PathArgToFSSpec (and the routines it calls) to
     rawbytestring
   o nativent: added SysUnicodeStringToNtStr() function
   o wii: convert dirio callbacks to use rawbytestring to avoid conversion
  + test for unicode mk/ch/rm/getdir()

git-svn-id: branches/cpstrrtl@25048 -
2013-07-04 22:28:37 +00:00
Jonas Maebe
893a9a57c6 * missing getdir -> do_getdir rename for r24993
git-svn-id: branches/cpstrrtl@25046 -
2013-07-04 22:28:27 +00:00
nickysn
3505ba4ee6 + added CPU detection code in the msdos rtl startup in order to properly initialize the Test8086 variable
git-svn-id: trunk@25034 -
2013-07-03 15:43:01 +00:00
Jonas Maebe
62ee16278b * changed getdir(ansistring):ansistring to
getdir(rawbytestring):rawbytestring so it can accept strings in any
    encoding and cleanly return results in DefaultRTLFileSystemCodePage
  + getdir(unicodestring):unicodestring
  * renamed the getdir implementation of all platforms except for embedded-
    without-ansistring-support to do_getdir(), and depending on the
    FPCRTL_FILESYSTEM_SINGLE_BYTE_API/FPCRTL_FILESYSTEM_TWO_BYTE_API define
    changed its shortstring parameter to ansistring or unicodestring. The
    do_getdir(rawbytestring) routine should just set the code page of the
    return value to DefaultFileSystemCodePage without conversion (not
    DefaultRTLFileSystemCodePage with conversion, that conversion is performed
    in getdir if necessary; this avoids double conversions in case
    getdir(unicodestring) is called)
  + generic getdir(shortstring) for platforms supporting either ansistrings or widestrings
  o platform maintainers:
   o OS/2: adjust code to supports paths > 255 characters if those are supported
   o Wii: adjust used callback to use rawbytestring to support paths > 255 characters and
     avoid shortstring->rawbytestring conversion overhead
   o Windows: GetCurrentDirectoryW is now always used (to prevent data loss)

git-svn-id: branches/cpstrrtl@24993 -
2013-06-27 21:37:47 +00:00
Jonas Maebe
da7a67bc74 + FPCRTL_FILESYSTEM_SINGLE_BYTE_API define that is set for targets where we
use a single byte API for file system operations
  + FPCRTL_FILESYSTEM_TWO_BYTE_API define that is set for targets where we
    use a single byte API for file system operations
   o in principle, both can be set if both are supprted and implemented in
     the RTL in order to minimise conversions depending on the scenario

git-svn-id: branches/cpstrrtl@24991 -
2013-06-27 21:37:39 +00:00
Jonas Maebe
eae1cd6cca * msdos target was added after the cpstrrtl branch was created; no special
defines

git-svn-id: branches/cpstrrtl@24914 -
2013-06-18 10:57:49 +00:00
nickysn
5d4ebf0dca + added extra_param_offset constant for accessing parameters in asm routines with nostackframe
git-svn-id: trunk@24873 -
2013-06-11 21:08:43 +00:00
nickysn
b74af9fda0 * declare the text segment with class=code on i8086-msdos
git-svn-id: trunk@24830 -
2013-06-09 12:13:52 +00:00
nickysn
cd5255c147 + added startup code for the medium memory model
git-svn-id: trunk@24820 -
2013-06-08 22:41:43 +00:00
nickysn
54ec2f4b4b * makefiles updated after the msdos loader changes
git-svn-id: trunk@24810 -
2013-06-05 16:43:56 +00:00
nickysn
e28852d07d * prt0 startup code file for small model renamed to prt0s
git-svn-id: trunk@24809 -
2013-06-05 16:41:39 +00:00
nickysn
c124283a36 * msdos startup code for tiny and small memory models moved to a shared nasm include file to avoid code duplication
git-svn-id: trunk@24808 -
2013-06-05 16:38:01 +00:00
nickysn
4cd26988ad + added prt0t.o (loader for i8086-msdos tiny memory model) to the makefiles
git-svn-id: trunk@24801 -
2013-06-03 21:11:45 +00:00
nickysn
b409d600ee + implemented the tiny memory model for i8086-msdos; we now produce working dos .com files as well
git-svn-id: trunk@24793 -
2013-06-02 23:02:10 +00:00
nickysn
c867fb14dd + implemented dos.exec on i8086-msdos
git-svn-id: trunk@24774 -
2013-06-02 13:42:29 +00:00
nickysn
40630a7cde * slight accuracy improvement in crt.delay for i8086-msdos
git-svn-id: trunk@24749 -
2013-06-01 19:23:25 +00:00
nickysn
4b3c67c51a + implemented dos.Keep for i8086-msdos; simple dos TSRs now work
git-svn-id: trunk@24730 -
2013-06-01 16:42:56 +00:00
nickysn
3953eed6b3 + added and implemented unit ports for i8086-msdos
git-svn-id: trunk@24722 -
2013-06-01 14:44:49 +00:00
nickysn
896d2f2bd5 + implemented dos.GetIntVec and SetIntVec for i8086-msdos
git-svn-id: trunk@24720 -
2013-06-01 14:32:03 +00:00
nickysn
14ded034f6 * fixed the msdos startup code for the cases when the largest available memory block is smaller that what would be needed for a full 64kb data segment
git-svn-id: trunk@24714 -
2013-06-01 13:19:10 +00:00
nickysn
6c51bcae37 + implemented dos.diskfree and disksize for i8086-msdos; cd-rom support not implemented yet
git-svn-id: trunk@24701 -
2013-06-01 10:48:38 +00:00
nickysn
ed7eb79486 + implemented dos.GetShortName and GetLongName for i8086-msdos
git-svn-id: trunk@24699 -
2013-06-01 10:34:07 +00:00
nickysn
7d757cc5ed + implemented dos.getfattr and setfattr for i8086-msdos
git-svn-id: trunk@24696 -
2013-06-01 10:17:00 +00:00
nickysn
327628a6bd + implemented dos.FindFirst/FindNext/FindClose for i8086-msdos
git-svn-id: trunk@24691 -
2013-06-01 09:41:16 +00:00
nickysn
33e04e954a + implemented crt.[no]sound for i8086-msdos; the crt unit is now complete
git-svn-id: trunk@24686 -
2013-06-01 08:34:29 +00:00
nickysn
68a80ccc66 * use rep movsw in crt.dosmemmove for i8086-msdos
git-svn-id: trunk@24681 -
2013-05-31 22:26:16 +00:00
nickysn
0446ccbba7 + implemented crt.delay for i8086-msdos
git-svn-id: trunk@24680 -
2013-05-31 22:17:23 +00:00
nickysn
fba73d3c96 + added and implemented unit msmouse for i8086-msdos
git-svn-id: trunk@24669 -
2013-05-31 16:54:01 +00:00
nickysn
1ee6628afd + implemented all the crt screen output functions for i8086-msdos
git-svn-id: trunk@24668 -
2013-05-31 15:09:10 +00:00
nickysn
f2ff50f80e + initial implementation of unit crt for i8086-msdos (based on the go32v2 version)
git-svn-id: trunk@24666 -
2013-05-31 14:29:35 +00:00
nickysn
89cbbe5931 + enabled compilation of unit objects for i8086-msdos
git-svn-id: trunk@24659 -
2013-05-31 09:39:17 +00:00
nickysn
ab03091865 + enabled compilation of unit classes on i8086-msdos
git-svn-id: trunk@24657 -
2013-05-31 08:29:23 +00:00
nickysn
a36288ee68 + enabled compilation of unit fgl on i8086-msdos
git-svn-id: trunk@24650 -
2013-05-30 19:02:13 +00:00
nickysn
730f7c82b7 * some fixes, intended to get units fgl and classes to compile on 16-bit cpus
git-svn-id: trunk@24649 -
2013-05-30 18:58:25 +00:00
nickysn
4e2962e6ae - do not initialize the regular heap manager under i8086-msdos, so it can be smartlinked away
git-svn-id: trunk@24614 -
2013-05-25 19:22:31 +00:00
nickysn
b26cdc776d + enabled compilation of units matrix, ucomplex and getopts for i8086-msdos
git-svn-id: trunk@24610 -
2013-05-25 18:06:39 +00:00
nickysn
5c49116d00 + enabled compilation of units types, dateutil, convutil, strutils and stdconvs for i8086-msdos
git-svn-id: trunk@24609 -
2013-05-25 17:55:20 +00:00
nickysn
bf132b31c6 + enabled compilation of unit variants for i8086-msdos
git-svn-id: trunk@24608 -
2013-05-25 16:40:45 +00:00
nickysn
01ff2221d7 + enabled compilation of varutils for i8086-msdos
git-svn-id: trunk@24607 -
2013-05-25 16:38:08 +00:00
nickysn
3492d29834 + added varutils.pp to the msdos rtl
git-svn-id: trunk@24604 -
2013-05-25 16:00:33 +00:00
nickysn
9813e9b4eb + enabled compilation of units rtlconst and typinfo for i8086-msdos
git-svn-id: trunk@24603 -
2013-05-25 15:51:58 +00:00
nickysn
fa5dd5eef0 + enabled compilation of unit iso7185 for i8086-msdos
git-svn-id: trunk@24599 -
2013-05-25 15:30:43 +00:00
nickysn
5bc70298de + enabled compilation of unit macpas for i8086-msdos
git-svn-id: trunk@24598 -
2013-05-25 15:29:12 +00:00
nickysn
1eda29951e + enabled compilation of the math unit for i8086-msdos
git-svn-id: trunk@24597 -
2013-05-25 15:25:19 +00:00
nickysn
062c0aa5f4 + sysutils for i8086-msdos compiles now\! yippiee\!\!\!
git-svn-id: trunk@24594 -
2013-05-25 14:22:46 +00:00
nickysn
4708132ddf + added sysutils.pp to the i8086-msdos rtl
git-svn-id: trunk@24590 -
2013-05-25 13:25:35 +00:00
nickysn
0f7673105b + implemented envcount, envstr and getenv for i8086-msdos
git-svn-id: trunk@24587 -
2013-05-24 20:42:56 +00:00
nickysn
0013186e2d + fully implemented ParamStr and ParamCount on i8086-msdos
git-svn-id: trunk@24582 -
2013-05-24 18:20:08 +00:00
nickysn
035cb74855 * far pointer helper types made global in the implementation of the system unit
git-svn-id: trunk@24578 -
2013-05-24 17:28:53 +00:00
nickysn
de26059b61 + added dos version check in GetProgramName
git-svn-id: trunk@24576 -
2013-05-24 15:45:16 +00:00
nickysn
9185ee9423 - rm debug writeln committed by accident
git-svn-id: trunk@24575 -
2013-05-24 15:43:34 +00:00
nickysn
7628c87e44 + obtain the msdos version on startup
git-svn-id: trunk@24574 -
2013-05-24 15:42:43 +00:00
nickysn
52328554e4 + implemented ParamStr(0) on i8086-msdos, using our limited far pointer support
git-svn-id: trunk@24573 -
2013-05-24 15:28:22 +00:00
nickysn
e7cf738c31 + enabled compilation of the lineinfo unit for i8086-msdos
git-svn-id: trunk@24534 -
2013-05-20 08:14:47 +00:00
nickysn
ec392e2939 + enabled compilation of unit heaptrc for i8086-msdos
git-svn-id: trunk@24528 -
2013-05-19 17:34:38 +00:00
pierre
7f5aa5a441 Avoid some range check errors for msdos target
git-svn-id: trunk@24517 -
2013-05-16 22:06:33 +00:00
nickysn
3109d0a58c + enabled compilation of the dos unit for msdos-i8086
git-svn-id: trunk@24485 -
2013-05-11 22:11:55 +00:00
nickysn
b2c95c851a * fixed bug in the intr and msdos functions, introduced in r24462
git-svn-id: trunk@24463 -
2013-05-07 19:15:39 +00:00
nickysn
0a8e008a0d + the ES register made volatile on i8086 as per the 16-bit x86 calling conventions
git-svn-id: trunk@24462 -
2013-05-07 14:27:21 +00:00
nickysn
f1861a71d6 + fixed startup hang in the i8086-msdos rtl on systems without an FPU
git-svn-id: trunk@24455 -
2013-05-06 21:36:37 +00:00
pierre
78a7043352 Regenerate all Makefiles with an up-to-date fpcmake binary (dummy commit)
git-svn-id: trunk@24367 -
2013-04-29 12:30:54 +00:00
nickysn
11a915e682 + zero fill the bss section on startup in the msdos loader
git-svn-id: trunk@24339 -
2013-04-27 10:04:56 +00:00
florian
3d7033d81e * Makefiles regenerated
git-svn-id: trunk@24325 -
2013-04-25 20:25:57 +00:00
nickysn
349f2868db * fixed intr/msdos bug introduced in r24308
git-svn-id: branches/i8086@24310 -
2013-04-23 12:59:48 +00:00
nickysn
e107eaea28 * a slight optimization in the MsDos routine (mov al instead of ax)
git-svn-id: branches/i8086@24309 -
2013-04-23 12:43:31 +00:00
nickysn
ff5091cfb8 * do not save bx, cx, si and di in the msdos and intr functions, as preserving them isn't required for the pascal calling convention
git-svn-id: branches/i8086@24308 -
2013-04-23 12:37:28 +00:00
nickysn
5ed1222e64 * changed the default i8086 calling convention to pocall_pascal
git-svn-id: branches/i8086@24290 -
2013-04-21 18:03:36 +00:00
nickysn
74cd67b85c + added 8087 initialization to the msdos rtl (8087 presence detection is still a TODO)
git-svn-id: branches/i8086@24140 -
2013-04-03 16:03:45 +00:00
nickysn
8a1178e4e9 * regenerated makefiles
git-svn-id: branches/i8086@24114 -
2013-04-01 17:30:11 +00:00
nickysn
873d5f7d05 * makefiles regenerated
git-svn-id: branches/i8086@24103 -
2013-04-01 02:02:53 +00:00
florian
7120d416f5 * enable only units which build on msdos
git-svn-id: branches/i8086@24095 -
2013-03-31 18:42:09 +00:00
nickysn
96fd997a97 - rm unported code from go32v2, generate runtime 304 if an unimplemented function is called
git-svn-id: branches/i8086@24094 -
2013-03-31 18:06:27 +00:00
nickysn
c44f760015 * i8086 near heap renamed 'tiny heap', moved to the inc/ directory
git-svn-id: branches/i8086@24082 -
2013-03-30 19:57:21 +00:00
nickysn
599d5d74ca + implemented Randomize for msdos
git-svn-id: branches/i8086@24081 -
2013-03-30 16:40:37 +00:00
nickysn
efa90dd1f3 * fixed potential buffer overflow in GetDir()
git-svn-id: branches/i8086@24080 -
2013-03-30 16:34:54 +00:00
nickysn
af751145b7 + msdos directory functions implemented, based on go32v2
git-svn-id: branches/i8086@24079 -
2013-03-30 16:26:02 +00:00
nickysn
bca3cd6160 + implemented all the remaining msdos file functions
git-svn-id: branches/i8086@24078 -
2013-03-30 15:46:41 +00:00
nickysn
620dc8cb64 * close all open files on exit
git-svn-id: branches/i8086@24077 -
2013-03-30 15:31:39 +00:00
nickysn
a463c1f558 + implemented file routines do_open and do_close for msdos, based on the go32v2 code
git-svn-id: branches/i8086@24076 -
2013-03-30 15:27:36 +00:00
nickysn
bbcd3506b3 + call initvariantmanager on msdos system unit startup
git-svn-id: branches/i8086@24075 -
2013-03-30 15:05:20 +00:00
nickysn
28545f2fad + implemented near heap for i8086-msdos, based on the embedded target heap
git-svn-id: branches/i8086@24074 -
2013-03-30 14:54:01 +00:00
nickysn
aab6df13ba * use Seg() instead of DSeg in the msdos rtl
git-svn-id: branches/i8086@24072 -
2013-03-30 13:05:30 +00:00
nickysn
27559aa5f8 * use Ofs() instead of typecasting to word for getting the offset of a pointer
git-svn-id: branches/i8086@24068 -
2013-03-30 11:41:07 +00:00
nickysn
2fd729cb4d + added CheckLFN to the msdos rtl
git-svn-id: branches/i8086@24067 -
2013-03-30 11:37:29 +00:00
nickysn
8f71f3b5fd + initialize more stuff in the msdos system unit startup
git-svn-id: branches/i8086@24065 -
2013-03-30 03:02:14 +00:00
nickysn
47342630e0 + allocate space for stack and heap dynamically on program startup for i8086-msdos
git-svn-id: branches/i8086@24063 -
2013-03-30 00:36:31 +00:00
florian
9edacdc9b4 + mem declarations
git-svn-id: branches/i8086@24060 -
2013-03-29 16:02:46 +00:00
florian
5ab9742c22 + start of dos unit (derived from go32v2)
* adapated Makefiles

git-svn-id: branches/i8086@24059 -
2013-03-29 15:58:21 +00:00
nickysn
102f929e99 - do not initialize the flags register on entry to the interrupt in the Intr/MsDos procedure (which is the TP-compatible behavior)
git-svn-id: branches/i8086@24058 -
2013-03-29 15:50:57 +00:00
nickysn
b61a9ba6a6 + implemented GetProcessID for i8086-msdos (returns the PSP)
git-svn-id: branches/i8086@24057 -
2013-03-29 15:23:32 +00:00
nickysn
9b79c52f32 * fixed bug in FPC_INTR and FPC_MSDOS
git-svn-id: branches/i8086@24046 -
2013-03-28 22:49:14 +00:00
nickysn
d8af51fdab + implemented do_read for i8086-msdos
git-svn-id: branches/i8086@24045 -
2013-03-28 22:22:47 +00:00
nickysn
1077093b08 + added error checking to the dos file operations
git-svn-id: branches/i8086@24044 -
2013-03-28 22:03:13 +00:00
nickysn
c76b459324 * implemented the MsDos function with an asm prequel to the Intr function
git-svn-id: branches/i8086@24043 -
2013-03-28 21:41:55 +00:00
nickysn
7b578f3e9c * reimplemented do_write and do_isdevice in Pascal, using the MsDos procedure
git-svn-id: branches/i8086@24042 -
2013-03-28 21:35:21 +00:00