Newsgroup: it.comp.os.dos
Titolo: lap link x dos

salve a tutti
volevo sapere se esiste, ed eventualmente dove reperirla, una versione
di lap link per dos che supporti i nomi di file lunghi
grazie e ciao
-- 
Rommel
romm...@XXXaltavista.net
(togliere "XXX" per rispondere)
(remove "XXX" to reply)

di lap link per dos che supporti i nomi di file lunghi
prova questo se funziona...
http://site.voila.fr/win3x/dl/laplink5.zip
§§§§§§ 	  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      	¤  Best Regards, from Slovenia,  SPAJKY®  ¤
 		~~~~~~~~~   ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙   °°°°°°°°°°°
"Feeling blue? Don´t ! , GO Here: 
http://rinkworks.com/stupid/cs_mincing.shtml
"
    Celly400@570/95FSB=AGP
 Enhanced* StandardFanCooling & 2,05Vcore
 + still on W95osr2.1..hm..
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 E-mail AntiSpam: remove #§ from my adress  §§§§§§§
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

grazie e ciao
Nomi lunghi e dos non vanno dacordo....
programmi sucessivi al 95 hanno qualche volta il suporto per i nomi
lunghi ma solo sotto win9x. visto che esite lap link per windows che è
molto meglio di quello per dos (io uso solo quello per dos :o) )
percui se vuoi usa quello dos che è ottimo se invece vuoi il solito
programma che a tutto (anche cose inutili) prendi il programma Win9x.
Sotto WinMe/NT/2K non c'è problema perche non esite il dos :o)
Il Razziatore,
The Only Good Windows in an uninstalled Windows
-----------------------------------------------
E-MAILs : 
razzi...@usa.net
 (Primary),
 
IlRazz...@netscape.net
 (for Attachent)
WEB     : 
http://www.razziatore.dns2go.com/
ICQ     : 67552596

 Sotto WinMe/NT/2K non c'è problema perche non esite il dos :o)
falsissimo. Anzi, l'emulatore DOS di Windows 2000 non solo fornisce un 
ambiente protetto come quello dei Windows NT precedenti, ma supporta 
anche le estensioni fornite da Windows 9x, inclusi un host DPMI e l'API 
per i nomi di file lunghi

per i nomi di file lunghi
Ne sei sicuro... prova a vedere aplicativi come Borland Pascal con uso
di puntatoiri, memoria grafica ecc ecc.... funziona malissimo


aplicativo a 32Bit a girare a 16bit?
semplicemente facendo da sè quello che DOS non fa per loro: passare 
dalla modalità reale alla modalità protetta. Come credi sia possibile 
altrimenti avviare sistemi operativi interamente a 32 bit (come Linux e 
Windows NT) su processori che all'accensione partono sempre in modalità 
reale?

reale?
Sin dalla procedura di boot è diversa.... Lo so bene visto che sto
facendo un OS...
Semplice questo è una procedura di boot per una file in PM (32Bit):
	%include "gdt.inc"
	struc	BB		;FAT Boot block
		resb	0xD	;Things we ignore
BB_clu		resb	1	;Sectors per cluster
BB_res		resw	1	;Reserved sectors
BB_fats		resb	1	;Number of FATs
BB_root		resw	1	;Root directory entries
		resb	3	;Things we ignore
BB_fat		resw	1	;Sectors per fat
BB_sec		resw	1	;Sectors per track
BB_head		resw	1	;Heads
	endstruc
SEGMENT	START USE16
;>   cs = 0
;>>  dl = drive we were booted from
boot:	jmp short start			;Standard start of boot sector
	nop
	resb	0x3B			;Skip over parameters (set by
format)
start:	cli				;{0}
	lgdt	[cs:gdt]		;Load GDT
	mov	ecx, CR0		;Switch to protected mode
	inc	cx
	mov	CR0, ecx		;{5}
.5:	in	al, 0x64		;Enable A20 {4A}
	test	al, 2
	jnz	.5
	mov	al, 0xD1
	out	0x64, al
.6:	in	al, 0x64
	and	ax, byte 2
	jnz	.6
	mov	al, 0xDF
	out	0x60, al
;>   ah = 0
;>   dl = drive we were booted from
	mov	al, flat_data		;Selector for 4Gb data seg
	mov	ds, ax			;{2} Extend limit for ds
	mov	es, ax			;Extend limit for es
	dec	cx			;Switch back to real mode
	mov	CR0, ecx		;{5}
	mov	[boot], dl		;Save drive number we came
from
	mov	sp, 0x800		;{1B}
	xor	eax, eax		;Segment
	mov	ds, ax			;
	mov	ss, ax
	mov	es, sp			;Read directory at 800:0 {1C}
;>   eax = 00000000
	mov	al, [boot+BB_fats]	;Number of FATs
	mul	byte [boot+BB_fat]	;Times size of FAT
	add	ax, [boot+BB_res]	;Plus Sectors before first FAT
					;eax = LBN of Root directory
	movzx	edi,word [boot+BB_root]	;Root directory entries
	push	di			; used again later
	dec	di			;Convert to number of sectors
	shr	di, 4			;  16 directory entries per
sector
	inc	di
	call	read_sectors
;>  eax  = LBN of root directory
;>  edi  = length of root directory in sectors
;>  [sp] = length of root directory in entries
;>  esi  = 00000000
	lea	ebp, [eax+edi]		;ebp = LBN of cluster 2
	pop	bx			;Root directory entries
	xor	di, di			;Point at directory {1C}
.20:	mov	si, file_name		;Name of file we want
	xor	ecx, ecx
	mov	cl, 11
	a32 rep cmpsb			;Found the file?
	je	found			;Yes
	add	cl, 21			;Offset to next directory
entry
	add	edi, ecx		;Advance to next entry
	dec	bx			;Loop through all entries
	jnz	.20
	;Couldn't find file in directory
boot_error:
disk_error:	
	mov	ax, 0xE07		;{3}
	int	10h
	jmp short $
;>> ecx   = 00000000
;> es     = 800
;> es:edi = Directory entry of file
;> ebp    = LBN of cluster 2
;> eax    = 0000????
found:	push	word [es:edi+0xF]	;Starting cluster of file
	mov	di, [boot+BB_fat]	;Size of FAT (in sectors)
	mov	ax, [boot+BB_res]	;LBN of FAT
	call	read_sectors
	mov	bx, 0x4000
	mov	es, bx			;es = 0x4000
	mov	edi, 0x100000-0x40000	;{1D}{4B} One megabyte minus
ES base
.10:
;>>    ecx = 0000????
;>    [sp] = Next cluster of file
;>     esi = 0000????
;>>    edx = 0000????
;>  es:edi = Destination address
;>     ebp = LBN of cluster 2
;>      ds = 0
	xor	eax, eax
	pop	si			;Next cluster of file
	mov	bx, si
	cmp	si, 0xFF8		;Valid cluster?
	jae	eof			;No: assume end of file
					;Yes: (c-bit set)
	rcr	bx, 1			;bx = 0x8000 + cluster/2
	mov	bx, [bx+si]		;Get word containing FAT entry
	jnc	.11			;Entry is low 12 bits
	shr	bx, 4			;Entry was high 12 bits
.11:	and	bh, 0xF			;Mask to just 12 bits
	push	bx			;Save cluster after next
	push	di			;Save destination address {7}
	mov	al, [boot+BB_clu]	;Size of each cluster
	mov	di, ax			;  (in sectors)
	dec	si
	dec	si
	mul	esi			;Times cluster number minus 2
	add	eax, ebp		;Plus LBN of cluster 2	
	call	read_sectors		;Read that cluster
;>     ecx = 0000????
;>>    edx = 0000????
;>      di = Clustersize in sectors
;>     esi = 0
;>>    ebp = LBN of cluster 2
;>    [sp] = Bottom 16-bits of destination address {7}
;>> [sp+2] = Following cluster
;>      ds = 0
;>      es = 4000
	mov	cx, di			;Cluster size in sectors
	xchg	ch, cl			;Cluster size in words
	pop	di			;Restore destination address
{7}
	es a32 rep movsw
	jmp short .10			;Loop until end of file
;>     eax = 0
;>     edx = 0000????
;>      bx = 0FF?
eof:
	mov	dx, 0x9C00
	mov	es, dx			;es = 9C00
	xor	di, di			;{1E} Address of page tables
WRT es
	mov	dh, 4096/256		;edx = 4096
.10:	mov	cx, 1024
	mov	al, 7
.20:	stosd
	add	eax, edx
	int	8			;{8}
	loop	.20
	shr	eax, 2			;{4C} (first time only) 4Mb /
4 = 1Mb
	neg	bl			;Done just one page?
	jns	.10			;Yes: do one more
	cli				;{6}
	mov	eax, 0x9C007		;First page tbl pointer in
page dir
	stosd				;{1H}
	mov	ax, (1024-3)*2
	xchg	ax, cx
	rep stosw
	mov	ax, 0xD007		;0FF800000 page tbl pointer
	stosd				;{1F}
	mov	ah, 0xE0		;Page directory self pointer
	stosd				;{1G}
	mov	al, 0
	mov	CR3, eax		;Set up page directory
	mov	eax, CR0		;Turn on paging and protected
mode
	or	eax, 0x80000001
	mov	CR0, eax
	mov	cl, flat_data		;Setup ds and es
	push	cx			;{5}
	pop	ds
	mov	es, cx
	jmp dword 8:0xFF800000		;Go
 
read_sectors:
; Input:
;	EAX = LBN
;	DI  = sector count
;	ES = segment
; Output:
;	EBX high half cleared
;	DL = drive #
;	EDX high half cleared
;	ESI = 0
; Clobbered:
;	BX, CX, DH
	push	eax
	push	di
	push	es
.10:	push	eax		;LBN
	cdq			;edx = 0
	movzx	ebx, byte [boot+BB_sec]
	div	ebx		;EAX=track ;EDX=sector-1
	mov	cx, dx		;CL=sector-1 ;CH=0
	sub	bl, dl		;BX = max transfer before end of track
	cmp	di, bx		;Do we want more than that?
	ja	.20		;Yes, do just this much now
	mov	bx, di		;No, do it all now
.20:	mov	esi, ebx	;Save count for this transfer.
	inc	cx		;CL=Sector number
	xor	dx, dx
	mov	bl, [boot+BB_head]
	div	ebx		;EAX=cylinder ;EDX=head
	mov	dh, dl		;Head
	mov	dl, [boot]	;Drive
	xchg	ch, al		;CH=Low 8 bits of cylinder number;
AL=0
	shr	ax, 2		;AL[6:7]=High two bits of cylinder
	or	cl, al		;CX = Cylinder and sector
	mov	ax, si		;Sector count
	mov	ah, 2		;Read
	xor	bx, bx
	push	ax
	int	13h
	pop	ax
	jnc	.30
	int	13h		;If at second you don't succeed, give
up
	jc near	disk_error
.30:	pop	eax
	add	eax, esi	;Advance LBN
	push	si
	shl	si, 5
	mov	bx, es
	add	bx, si		;Advance segment
	mov	es, bx
	pop	si
	sub	di, si
	ja	.10
	pop	es
	pop	di
	pop	eax
	xor	si, si
	ret	
file_name db 'KERNEL  BIN'
gdt	start_gdt		;{9}
flat_code	desc	0, 0xFFBFF, D_CODE+D_READ+D_BIG+D_BIG_LIM
flat_data	desc	0, 0xFFFFF, D_DATA+D_WRITE+D_BIG+D_BIG_LIM
	end_gdt
	resb 0x1FE+$$-$
	db	0x55, 0xAA		;Standard end of boot sector
mentre questo è quello di uno non in PM ma benzi in RealMode:
%define	sc_p_clu	bp+0Dh		;byte  Sectors per cluster
%define	sc_b4_fat	bp+0Eh		;word  Sectors (in partition)
before FAT
%define	fats		bp+10h		;byte  Number of FATs
%define dir_ent		bp+11h		;word  Number of root
directory entries
%define	sc_p_fat	bp+16h		;word  Sectors per FAT
%define sc_p_trk	bp+18h		;word  Sectors per track
%define heads		bp+1Ah		;word  Number of heads
%define sc_b4_prt	bp+1Ch		;dword Sectors before
partition
%define drive		bp+24h		;byte  Drive number
	org	0x7C00
entry:
	jmp	short begin
	nop
; Skip over the data portion of the "DOS BOOT RECORD".  The install
method
; must merge the code from this ASM with the data put in the boot
record
; by the FAT12 formatter.
;
	times 0x3B db 0
begin:
	xor	ax, ax
	mov	ds, ax
	mov	ss, ax
	mov	sp, 0x7C00
	mov	bp, sp
	mov	[drive], dl	;Drive number
	mov	al, [fats]	;Number of FATs
	mul	word [sc_p_fat]	; * Sectors per FAT
	add	ax, [sc_b4_fat]	; + Sectors before FAT
				;AX = Sector of Root directory
	mov	si, [dir_ent]	;Max root directory entries
	mov	cl, 4
	dec	si
	shr	si, cl
	inc	si		;SI = Length of root in sectors
	mov	di, ROOT_SEG/32	;Buffer (paragraph / 32)
	call	read_16		;Read root directory
	push	ax		;Sector of cluster two
%define sc_clu2 bp-2		;Later access to the word just pushed
is via bp
	mov	dx, [dir_ent]	;Number of directory entries
	push	ds
	pop	es
	mov	di, ROOT_SEG*16
search:
	dec	dx		;Any more directory entries?
	js	error		;No
	mov	si, filename	;Name we are searching for
	mov	cx, 11		;11 characters long
	lea	ax, [di+0x20]	;Precompute next entry address
	push	ax
	repe cmpsb		;Compare
	pop	di
	jnz	search		;Repeat until match
	push word [di-6]	;Starting cluster number
	mov	ax, [sc_b4_fat]	;Sector number of FAT
	mov	si, [sc_p_fat]	;Length of FAT
	mov	di, FAT_SEG/32	;Buffer (paragraph / 32)
	call	read_16		;Read FAT
next:
	pop	bx		;Cluster number
	mov	si, bx		;First cluster in this sequence
	mov	ax, bx		;Last cluster in this sequence
.0:
	cmp	bx, 0xFF8	;End of file?
	jae	.2		; Yes
	inc	ax		;Last cluster plus one in sequence
	;Look in FAT for next cluster
	mov	di, bx		;Cluster number
	rcr	bx, 1		;1.5 byte entry per cluster
				;bx = 0x8000 + cluster/2
				;c-bit set for odd clusters
	mov	bx, [bx+di+FAT_SEG*16-0x8000]
	jnc	.1
	shr	bx, 1
	shr	bx, 1
	shr	bx, 1
	shr	bx, 1
.1:	and	bh, 0xF
	cmp	ax, bx		;Is the next one contiguous?
	je	.0		;Yes: look further ahead
.2:	sub	ax, si		;How many contiguous in this sequence?
	jz	eof		;None, must be done.
	push	bx		;Save next (eof or discontiguous)
cluster
 
	mov	bl, [sc_p_clu]	;Sectors per cluster
	mov	bh, 0		;  as a word
	mul	bx		;Length of sequence in sectors
.3:	mov	di, IMAGE_SEG/32 ;Destination (paragraph / 32)
	add	[.3+1], ax	 ;Precompute next destination
	xchg	ax, si		;AX = starting cluster ;SI = length in
sectors
	dec	ax
	dec	ax		;Starting cluster minus two
	mul	bx		; * sectors per cluster
	add	ax, [sc_clu2]	; + sector number of cluster two
	adc	dl, dh		;Allow 24-bit result
	call	read_32		;Read it
	jmp	short next	;Look for more
eof:
	jmp	IMAGE_SEG:0
error:	mov	si, errmsg	;Same message for all detected errors
	mov	ax, 0xE0D	;Start message with CR
	mov	bx, 7
.1:	int	10h
	lodsb
	test	al, al
	jnz	.1
	xor	ah, ah
	int	16h		;Wait for a key
	int	19h		;Try to reboot
read_16:
	xor	dx, dx
read_32:
;
; Input:
;    dx:ax = sector within partition
;    si    = sector count
;    di    = destination segment / 32
;
; The sector number is converted from a partition-relative to a
whole-disk
; (LBN) value, and then converted to CHS form, and then the sectors
are read
; into (di*32):0.
;
; Output:
;    dx:ax  updated (sector count added)
;    di     updated (sector count added)
;    si = 0
;    bp, ds preserved
;    bx, cx, es modified
.1:	push	dx			;(high) relative sector
	push	ax			;(low) relative sector
	add	ax, [sc_b4_prt]		;Convert to LBN
	adc	dx, [sc_b4_prt+2]
	mov	bx, [sc_p_trk]		;Sectors per track
	div	bx			;AX = track ;DX = sector-1
	sub	bx, dx			;Sectors remaining, this track
	cmp	bx, si			;More than we want?
	jbe	.2			;No
	mov	bx, si			;Yes: Transfer just what we
want
.2:	inc	dx			;Sector number
	mov	cx, dx			;CL = sector ;CH = 0
	cwd				;(This supports up to 32767
tracks
	div	word [heads]		;Track number / Number of
heads
	mov	dh, dl			;DH = head
	xchg	ch, al			;CH = (low) cylinder  ;AL=0
	ror	ah, 1			;rotate (high) cylinder
	ror	ah, 1
	add	cl, ah			;CL = combine: sector, (high)
cylinder
	sub	ax, di
	and	ax, byte 0x7F		;AX = sectors to next 64Kb
boundary
	jz	.3			;On a 64Kb boundary already
	cmp	ax, bx			;More than we want?
	jbe	.4			;No
.3:	xchg	ax, bx			;Yes: Transfer just what we
want
.4:	push	ax			;Save length
	mov	bx, di			;Compute destination seg
	push	cx
	mov	cl, 5
	shl	bx, cl
	pop	cx
	mov	es, bx
	xor	bx, bx			;ES:BX = address
	mov	dl, [drive]		;DL = Drive number
	mov	ah, 2			;AH = Read command
	int	13h			;Do it
	jc	error
	pop	bx			;Length
	pop	ax			;(low) relative sector
	pop	dx			;(high) relative sector
	add	ax, bx			;Update relative sector
	adc	dl, dh
	add	di, bx			;Update destination
	sub	si, bx			;Update count
	jnz	.1			;Read some more
	ret
errmsg	db	10,"Error Executing FAT12 bootsector",13
	db	10,"Press any key to reboot",13,10,0
size	equ	$ - entry
%if size+11+2 > 512
  %error "code is too large for boot sector"
%endif
	times	(512 - size - 11 - 2) db 0
filename db	"LOADER  BIN"		;11 byte name
	db	0x55, 0xAA		;2  byte boot signature
Il Razziatore,
The Only Good Windows in an uninstalled Windows
-----------------------------------------------
E-MAILs : 
IlRazz...@netscape.net


Semplice questo è una procedura di boot per una file in PM (32Bit):
prego? non credo di aver capito lo scopo di tanto sfoggio di ASM. Qual è 
esattamente il punto?



Semplice (e qui chiudo) che la diferenza tra Protect Mode e Real Mode
inzia nel boot loader


Mode inzia nel boot loader
ma va'? e io cos'ho detto? comunque guarda che puoi sempre passare da 
una all'altra in qualsiasi momento...