Memory mapped devices from resl mode (Developers)
> Freepascal uses an own version of a (probably very old) djgpp stub.asm.
>
> See
> https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/go32v2/v2prt0.as?view=co
>
> It seems it has some support for increasing the ds limit depending on
> __crt0_startup_flags, but I don't know how to set those.
>
> /* Maybe set our DS limit to 4Gb in size if flag set */
> testb $0x80, __crt0_startup_flags /* include/crt0.h */
> jz 2f
> movw $0xffff, %cx
> movl %ecx, %edx
> movw $0x0008, %ax /* reset alias limit to
> -1 */
> int $0x31
> movw %cs, %bx
> movw $0x0008, %ax /* reset DS limit to -1
> */
> int $0x31
> movw %ds, %bx
> movw $0x0008, %ax /* reset DS limit to -1
> */
> int $0x31
> lsl %ebx, %ebx /* Should be -1 */
> incl %ebx
> jz 2f
> andb $0x7f, __crt0_startup_flags /* clear it if failure
> */
> 2:
With DJGPP the flag is not set by default in __crt0_startup_flags (see crt0.S), normally you need to call __djgpp_nearptr_enable (see also nearptr.c).
---
Glory to God for all things
Complete thread:
- Memory mapped devices from resl mode - Laaca, 26.02.2020, 12:11
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- Memory mapped devices from resl mode - Khusraw, 26.02.2020, 12:35
- Memory mapped devices from resl mode - RayeR, 27.02.2020, 05:27
- Memory mapped devices from resl mode - Khusraw, 27.02.2020, 09:07
- Memory mapped devices from resl mode - Laaca, 04.03.2020, 14:01
- Memory mapped devices from resl mode - Khusraw, 04.03.2020, 15:02
- Memory mapped devices from resl mode - Laaca, 04.03.2020, 15:08
- Memory mapped devices from resl mode - Khusraw, 04.03.2020, 15:23
- Memory mapped devices from resl mode - Khusraw, 04.03.2020, 15:36
- Memory mapped devices from resl mode - Khusraw, 04.03.2020, 16:55
- Memory mapped devices from resl mode - Laaca, 04.03.2020, 18:54
- Memory mapped devices from resl mode - Khusraw, 04.03.2020, 19:33
- Memory mapped devices from resl mode - Laaca, 04.03.2020, 18:54
- Memory mapped devices from resl mode - Laaca, 04.03.2020, 15:08
- Memory mapped devices from resl mode - Khusraw, 04.03.2020, 15:02
- Memory mapped devices from resl mode - Laaca, 04.03.2020, 14:01
- Memory mapped devices from resl mode - Laaca, 27.02.2020, 17:50
- Memory mapped devices from resl mode - Khusraw, 27.02.2020, 20:25
- Memory mapped devices from resl mode - KormaX, 01.03.2020, 22:23
- Memory mapped devices from resl mode - Zyzzle, 02.03.2020, 06:10
- Memory mapped devices from resl mode - KormaX, 12.05.2020, 11:21
- Memory mapped devices from resl mode - Zyzzle, 02.03.2020, 06:10
- Memory mapped devices from resl mode - marcov, 02.03.2020, 15:43
- Memory mapped devices from resl mode - Khusraw, 02.03.2020, 19:39
- Memory mapped devices from resl mode - marcov, 02.03.2020, 23:13
- Memory mapped devices from real mode - Rugxulo, 03.03.2020, 06:11
- Memory mapped devices from real mode - marcov, 03.03.2020, 10:12
- Memory mapped devices from real mode - Rugxulo, 03.03.2020, 22:12
- Memory mapped devices from real mode - marcov, 03.03.2020, 10:12
- Memory mapped devices from resl mode - Khusraw, 03.03.2020, 13:34
- Memory mapped devices from real mode - Rugxulo, 03.03.2020, 06:11
- Memory mapped devices from resl mode - marcov, 02.03.2020, 23:13
- Memory mapped devices from resl mode - Khusraw, 02.03.2020, 19:39
- Memory mapped devices from resl mode - KormaX, 01.03.2020, 22:23
- Memory mapped devices from resl mode - Khusraw, 27.02.2020, 20:25
- Memory mapped devices from resl mode - Khusraw, 27.02.2020, 09:07
Mix view