Commit Graph

167 Commits

Author SHA1 Message Date
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