Write a file splitter with compilation

xiaoxiao2021-03-06  44

Today, when I took the things on the dormitory machine to the machine, I accidentally found a file splitter written in the previous year. This year passed, I have not used compilation, I have forgotten it. Looking again, when I used a small program written by Qihui, I had an inexplicable feeling, so I want to put it on Blog. Here is the source code:

File Splitter v1.0

; Author: lupeipei (GoodName008)

Date: 2003.11.29

; Blog: http://blog.9cbs.net/goodname008

File_create EQU 3ch; Create File

File_open EQU 3DH; Open File

File_read EQU 3FH; Read file

File_write EQU 40h; Write file

File_close EQU 3EH; Close File

File_moveptr EQU 42H; Move File Pointer

FILE_DELETE EQU 41H; Delete File

ERR_IFN EQU 01H; Invalid File Number

Err_fnf EQU 02H; File Not Found

Err_PNF EQU 03H; Path Not Found

Err_TMF EQU 04H; Too Many File Opened

Err_RIO EQU 05H; Refuse Input / Output

Err_IFH EQU 06H; Invalid File Handler

Attr_archive EQU 00H; File Attrib: Archive

Attr_readonly EQU 01H; File Attrib: Read-ONLY

Attr_hidden EQU 02H; File Attrib: Hidden

Attr_system EQU 04H; File Attrib: System

Mode_read Equ 00H; File Open Mode: Read-Only

Mode_Write EQU 01H; File Open Mode: Write-only

Mode_rw EQU 02H; File Open Mode: Read and Write

DSEG segment

ERROR_OF DB 'FAILED To Open File.', 0DH, 0AH, '$'

ERROR_MP DB 'FAILED TO MOVE The Pointer Of File.', 0DH, 0AH, '$'

ERROR_FS DB 'THE FILE SIZE MUSD Be More Than 1MB and LESS THAN 4096MB.', 0DH, 0AH, '$'

ERROR_VC DB 'The Number of Volume Must Be More Tan 1 And Less Than 100.', 0DH, 0AH, '$'

Error_cf db 'falied to create file.', 0DH, 0AH, '$'

ERROR_WF DB 'Insufficient Disk Space.', 0DH, 0AH, '$' Complete DB 'Complete Success FuL - !!!', 0DH, 0AH

DB 'Thank you for using this software.', 0DH, 0ah, '$'

LOGO DB 'LPP (R) File Splitter Version 1.0', 0DH, 0AH

DB 'Copyright (C) LPP Software Studio 2003-2004. All Rights Reserved.', 0DH, 0AH, 0DH, 0AH

DB 'Options: 1 - Split 2 - Combine', 0DH, 0AH, 0DH, 0AH

DB 'Your Choice: $'

Promptf DB 'Source FileName: $'

FileSize DB 'File Size:', 8 DUP ('$')

Optionsize DB 'Volume Size Options: 1 - Floppy Disk 2 - Custom.', 0DH, 0AH, 0DH, 0AH

DB 'Your Choice: $'

PROMPTS DB 'VOLUME SIZE (MB): $'

PrompTTF DB 'Target FileName (DON', "'":' Tinput Extend Name

SFSIZE DD?

TFSIZE DW?

SFNUM DW?

TFNUM DW?

SFNAME DB 65,?, 65 dup (0), '$'

TFNAME DB 65,?, 65 DUP (0), '. Ext', 0, '$'

VSIZE DB 4,?, 4 dup (0), '$'

PDIGIT DB 0, 1, 1, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 9

Buffer DB 60736 DUP (?), '$'

FLAG DB?

DSEG Ends

SSEG Segment Stack

DB 100 DUP (?)

SSEG Ends

CSEG segment

Assume CS: CSEG, DS: DSEG, SS: SSEG

Start: MOV AX, DSEG

MOV DS, AX

Lea DX, LOGO; Print Author, Copyrights and Options

MOV AH, 9H

Int 21h

MOV AH, 1H; Get User Choice

Int 21h

Call PrintCrlf

CMP

Al

, '1'; 1 - Split 2 - Combine

Je

Split

CMP

Al

,'2'

Je Combine

MOV AH, 4CH

Int 21h

Combine: Call Combinemodule

Split

: Call SplitModule

; ------------------------------------------------- ---------------------------

Combinemodule Proc

Mov PrompTTF [15], ':' MOV PROMPTTF [16], ''

Mov PrompTTF [17], '$'

LEA DX, PROMPTTF; Print "Target filename:"

MOV AH, 9H

Int 21h

Lea DX, TFNAME; Get The Target FileName from User

Mov Ah, 0ah

Int 21h

MOV DL, TFNAME 1; Set the last filename char to 0

XOR DH, DH

MOV DI, DX

Mov TFNAME [DI 2], 0

Call PrintCrlf

Lea DX, TFNAME 2; CREATE TARGET FILE

MOV AH, File_Create

MOV CX, Attr_Archive

Int 21h

Mov Tfnum, Ax; Save Target File Number To TFNUM

JNC COK_CF; if Error Then EXIT

Lea DX, Error_CF

MOV AH, 9H

Int 21h

MOV AH, 4CH

Int 21h

COK_CF: LEA DX, Promptsf; Print "Source FileName:"

MOV AH, 9H

Int 21h

Lea DX, Sfname; Get The Source FileName from User

Mov Ah, 0ah

Int 21h

Call PrintCrlf

MOV DL, SFNAME 1; Set the last filename char to 0

XOR DH, DH

MOV DI, DX

Lea Di, Sfname [Di]; Source FileName Extendsion's Number -> Di

MOV BYTE PTR [DI 2], 0

MOV BYTE PTR [DI 3], '$'

Call PrintCrlf

Call PrintCrlf

Mov TfSize, 0FFFFH; Copy 1048576 BYTES Per Time

XOR AX, AX

C_next: Push AX

Call HEXTODECASC; Change Source File EXTEND NAME

MOV BX, AX

Lea DX, SFNAME 2; Open Source File

Mov Ah, File_Open

MOV Al, Mode_Read

Int 21h

Mov sfnum, ax; save source file number

JNC COK_OF; if Error Then EXIT

CMP BX, 0; if Complete THE EXIT

JNE EXITCSU

Call PrintCrlf

Lea DX, Error_OF; Print "falsed to open file."

MOV AH, 9H

Int 21h

MOV AH, 4CH

Int 21h

EXITCSU: Call PrintCrlf

LEA DX, Complete; Print "Complete Success, ..."

MOV AH, 9H

Int 21h

MOV AH, 4CHINT 21H

COK_OF: LEA DX, SFNAME 2; Print Source FileName

MOV AH, 9H

Int 21h

MOV DL, '.'; Print "..."

Mov Ah, 2H

Int 21h

Int 21h

Int 21h

Int 21h

Int 21h

Int 21h

Call PrintCrlf

CCOPY: CALL COPYBYTES

JC EXITCWF; if Disk Full Then EXIT

CMP Flag, 1; if Complete Then EXIT

JNE CCOPY

MOV BX, SFNUM; Close Source File

Mov Ah, File_Close

Int 21h

POP AX

Inc AX

JMP C_Next

EXITCWF: Call PrintCrlf

Lea DX, Error_WF; Print "Insufficient Disk Space."

MOV AH, 9H

Int 21h

MOV AH, 4CH

Int 21h

Combinemodule Endp

; ------------------------------------------------- ---------------------------

SplitModule Proc

Lea DX, Promptsf; Print "Source FileName:"

MOV AH, 9H

Int 21h

Lea DX, Sfname; Get The Source FileName from User

Mov Ah, 0ah

Int 21h

Call PrintCrlf

MOV DL, SFNAME 1; Set the last filename char to 0

XOR DH, DH

MOV Si, DX

MOV SFNAME [Si 2], 0

Call PrintCrlf

Lea DX, SFNAME 2; Open Source File

Mov Ah, File_Open

MOV Al, Mode_Read

Int 21h

JNC SOK_OF; if Error Then EXIT

Lea DX, Error_of

MOV AH, 9H

Int 21h

MOV AH, 4CH

Int 21h

SOK_OF: MOV SFNUM, AX; Save Source File Number

MOV BX, AX

XOR CX, CX; Get the length of file (bytes) -> dx: AX

XOR DX, DX

MOV Al, 02H

MOV AH, File_Moveptr

Int 21h

JNC SOK_MP; if Error Occured Then EXIT

Lea DX, Error_MP

MOV AH, 9H

Int 21h

MOV AH, 4CH

Int 21h

SOK_MP: CMP DX, 0010H; if the length of file is less 1mb or more Than 4096MB THEN EXIT

JB EXIT_FS

CMP DX, 0FFF0H

JNA SOK_FS

EXIT_FS: Lea DX, Error_FS

MOV AH, 9H

INT 21HMOV AH, 4CH

Int 21h

SOK_FS: MOV Word PTR SFSIZE, AX

Mov Word PTR SFSIZE 2, DX

MOV AX, DX; The Length of File (MB) -> AX

MOV CL, 4

SHR AX, CL

Push Ax; Save the Length of File to Stack

MOV DX, AX

Lea BX, FileSize [11]

Call HEXTODECASC5

MOV FileSize [DI 11], '.'

MOV FileSize [DI 12], '0'

MOV AX, Word PTR SFSIZE 2

And Ax, 000fh; Calculate The Point Part

XXXX.P

MB

)

Lea bx, pdigit

Xlat

MOV DX, AX

Lea BX, FileSize [Di 12]

Call HEXTODECASC5

MOV FileSize [Si 11 1], '0'

Lea DX, FileSize

MOV AH, 9H

Int 21h

MOV AH, 2H; Show 'MB' After Source File Size

MOV DL, ''

Int 21h

MOV DL, 'M'

Int 21h

MOV DL, 'B'

Int 21h

Call PrintCrlf

Call PrintCrlf

MOV BX, SFNUM; Set File Pointer to 0000: 0000

XOR CX, CX

XOR DX, DX

MOV Al, 00h

MOV AH, File_Moveptr

Int 21h

Lea DX, Optionsize; Print Volume Size Options Information

MOV AH, 9H

Int 21h

MOV AH, 1H; Get User Choice

Int 21h

Call PrintCrlf

CMP Al, '1'; 1 - FLOPPY DISK (1.44 MB) 2 - Custom.

Je FLP

CMP

Al

,'2'

Je Custom

MOV AH, 4CH

Int 21h

; if Floppy Then Check File Size

FLP: CMP Word PTR SFSIZE 2,0016h

JB EXIT_VC

JE CMPLOW

MOV AX, Word PTR SFSIZE 2

CMP AX, 8B0H

JA EXIT_VC

JMP SOK_VC

Cmplow: CMP Word Ptr sfsize, 3E00H

JB EXIT_VC

JMP SOK_VC

Custom: Lea DX, Prompts; Print "Volume Size:"

MOV AH, 9H

Int 21h

Lea DX, VSIZE; GET VOLUME SIZE TO AX (N: MB)

Call Receivenum

Lea DX, VSIZE 2

Call asctohex

Call bcdtohex

CMP AX, 0

JE EXIT_VC

MOV Si, AX; Ax -> Si (Volume Size, N: MB) MOV TFSIZE, AX; Save Volume Size To Memory

POP AX; Restore the Length of File from Stack

XOR DX, DX; VOLUME Count -> AX (Actually in

Al

)

Div Si

CMP AX, 0; if Volume Count = 0 or More Than 100 Then EXIT

JE EXIT_VC

CMP AX, 64H

JNA SOK_VC

EXIT_VC: Lea DX, Error_VC

MOV AH, 9H

Int 21h

MOV AH, 4CH

Int 21h

SOK_VC: LEA DX, PROMPTTF; Print "Target FileName:"

MOV AH, 9H

Int 21h

Lea DX, TFNAME; Get The Target FileName from User

Mov Ah, 0ah

Int 21h

Call PrintCrlf

MOV DL, TFNAME 1; Set The last filename char to '.'

XOR DH, DH

MOV Si, DX

MOV TFNAME [Si 2], '.'; Set target filename format "x: / ********. Lnn"

Mov TFNAME [Si 3], 'L'

Lea Di, TFNAME [Si 4]; Target FileName Extendsion's Number -> Di

MOV BYTE PTR [DI 3], '$'

MOV BYTE PTR [DI 2], 0; Set The last filename char to 0

XOR AX, AX; The First Volume Name Is * .l00

Call PrintCrlf

S_Next: Push Ax; Save The Last Two Extension (.l **) to Stack

Call HEXTODECASC; Set Target FileName Extension (.lnn)

Lea DX, TFNAME [2]; Print FileName (Volume)

MOV AH, 9H

Int 21h

MOV DL, '.'; Print "..." after file filename

Mov Ah, 2H

Int 21h

Int 21h

Int 21h

Int 21h

Int 21h

Int 21h

Call PrintCrlf

Lea DX, TFNAME [2]; Create Target File (Volume)

MOV CX, Attr_Archive

MOV AH, File_Create

Int 21h

JNC SOK_CF; if Error Occurs Then EXIT

Lea DX, Error_CF

MOV AH, 9H

Int 21h

MOV AH, 4CH

Int 21h

SOK_CF: MOV TFNUM, AX; Save File Number To Tfnummov CX, TFSIZE; COPY (1048576 * Volume Size) BYTES

JCXZ CPYFLP

COPY: CALL COPYBYTES

JC EXIT_WF; if Disk Full Then EXIT

CMP Flag, 1; if Complete Then EXIT

JE EXIT_SU

Loop

Copy

JMP Close

CPYFLP: Call Copybytes; COPY 1457664 (1.44 MB) BYTES

JC EXIT_WF; if Disk Full Then EXIT

CMP Flag, 1; if Complete Then EXIT

JE EXIT_SU

Close: MOV BX, TFNUM; Close Target File (Volume)

Mov Ah, File_Close

Int 21h

POP AX; Restore the last twionsion (.l **) from stack

Inc AX

JMP S_Next

EXIT_WF: Call PrintCrlf

Lea DX, Error_WF; Print "Insufficient Disk Space."

MOV AH, 9H

Int 21h

JMP EXIT

EXIT_SU: Call PrintCrlf

Lea DX, Complete; Print "Complete Success, ..."

MOV AH, 9H

Int 21h

EXIT: MOV BX, TFNUM; Close Target File (The Last Volume !!!)

Mov Ah, File_Close

Int 21h

MOV BX, SFNUM; Close Source File

Int 21h

MOV AH, 4CH

Int 21h

SplitModule ENDP

; ------------------------------------------------- ---------------------------

PROC NAME: COPYBYTES

Function: Copy Some Bytes (1MB OR 1.44MB) from sfnum (Source File Number) To TFNUM (Target File Number)

Parameter: (None, Actually In the Memory Tfsize, Sfnum, TFNUM)

RetValue: Cf: if there is not enough bytes forread, cf = 1

NOTE: (1) It can be only used in this program !!!!!

CopyBytes Proc

Push AX

Push BX

PUSH CX

Push dx

Push Si

Push di

MOV FLAG, 0

Mov Si, 24; Repeat 24 Times, Copy 60736 BYTES Per Time

MOV Di, 60736; 24 * 60736 = 1457664 (1.44 MB)

CMP TFSIZE, 0

JE C_READ

Mov Si, 32; Repeat 32 Times, Copy 32768 BYTES Per Timemov Di, 32768; 32 * 32768 = 1048576

C_read: MOV BX, SFNUM; Read Di bytes from Source File

MOV CX, DI

Lea DX, Buffer

Mov Ah, File_Read

Int 21h

CMP AX, CX; Check Out: WHETHER Read Di bytes or Not

JE C_WRITE

MOV flag, 1

C_WRITE: MOV BX, TFNUM; Write Di Bytes to Target File

MOV CX, AX

Lea DX, Buffer

MOV AH, File_Write

Int 21h

STC

CMP AX, CX; if Disk Full Then Return (CF = 1)

JNE C_RET

CMP Flag, 1; if Complete Then Return (Flag = 1)

JE C_CLC

Dec Si

JNZ C_Read

C_CLC: CLC

C_ret: POP DI

POP Si

POP DX

POP CX

POP BX

POP AX

RET

Copybytes Endp

PROC NAME: BCDTOHEX

Function: Convert BCD Number to Hex Number

Parameter: AX = The BCD Number

RetValue: ax = the hex number

NOTICE: (1) Algorithm:

; BCD - (8 * C18 4 *

9C

2 * 6) = HEX

; 8421 - (8 * C18 4 *

9C

2 * 6)

BCDTOHEX PROC

Push BX

PUSH CX

Push dx

Push Si

MOV BX, AX; 2 * 6

MOV CL, 4

SHR Al, Cl

XOR AH, AH

MOV CH, 6

Mul ch

MOV Si, AX; 2 * 6 -> Si

MOV Al, BH; 4 *

9C

AND

Al

0FH

MOV CH, 9CH

Mul ch

XOR DX, DX; 4 *

9C

2 * 6

Add Ax, Si

MOV Si, AX; 4 *

9C

2 * 6 -> Si

MOV Al, BH; 8 * C18

SHR Al, Cl

XOR AH, AH

MOV CX,

0C

18h

MUL CX

Add Ax, Si; 8 * C18 4 *

9C

2 * 6

MOV Si, AX; 8 * C18 4 *

9C

2 * 6 -> Si

MOV AX, BX; 8421 - (8 * C18 4 *

9C

2 * 6) -> AX

SUB AX, SI

POP Si

POP DX

POP CX

POP BX

RET

BCDTOHEX ENDP

PROC NAME: ReceiveNum

Function: Receive a Number from keyboard (decimal)

Parameter: dx = the first address of the buffer

RetValue: Bytes in buffer (i.e. '0018')

NOTE: (1) The first byte from dx is the length of number you want receive

; (2) The second byte from dx is the length of number you inputta

; (3) The buffer is not include [Enter]

ReceiveNum Proc

Push Si

Push AX

Push BX

PUSH CX

Push dx

Mov Si, DX; Save the Length To BL, Cl

MOV BL, BYTE PTR [Si]

Mov Cl, Byte PTR [Si]

XOR CH, CH

R_AGN: MOV AH, 8H; Waiting Input

Int 21h

CMP Al, 0DH; if [Enter] Then Save Number String and Return

Je r_ent

CMP AL, 8; if [backspace] Then Delete the last Number

JE r_BACK

CMP CL, 0; if get the length life

JE r_beep

CMP Al, '0'; if '0' <= ASCII <= '9' Then Show else beep

JB r_beep

CMP

Al

,'9'

JBE r_SHOW

R_Beep: MOV DL, 7H; Beep and Receive Again

Mov Ah, 2H

Int 21h

JMP R_AGN

R_show: MOV DL,

Al

Show Character

Mov Ah, 2H

Int 21h

MOV BYTE PTR [Si 2],

Al

Save Character to Memory

Inc Si

LOOP R_AGN; Receive Again

JMP R_AGN; *** WHEN CX = 0, Don't Execute R_Back

R_back: CMP CL, BL; Avoid Deleting Extra Character

JE r_AGN

MOV DL, 8; show [backss]

Mov Ah, 2H

Int 21h

MOV DL, ''; Clear Current Cursor's Position

Int 21h

MOV DL, 8; show [backspace] again

Int 21h

CMP CX, 0; if CX = 0 THEN NOT SAVE IT TO MEMORY

Je r_bagn

MOV BYTE PTR [Si 2], 0R_bagn: Dec Si

INC CX

JMP R_AGN

R_ENT: MOV DL, 0DH; Finish INPUTING, PRINT 0DH, 0AH

Mov Ah, 2H

Int 21h

MOV DL, 0AH

Int 21h

POP DX; RESTORE DX

Mov Si, Dx; Save Actually Length

MOV Al, Byte Ptr [Si]

XOR AH, AH

SUB Al, Cl

MOV BYTE PTR [Si 1],

Al

CMP Al, 0; if INPUT NOTHING OR INPUT FULL LENGTH THEN RETURN

Je r_retn

CMP AL, BL

Je r_retn

MOV BX, AX; add leading-zero (i.e. '0018')

MOV CX, BX

R_PRE0: MOV Al, [Si BX 1]

MOV [Si 5],

Al

MOV BYTE PTR [Si BX 1], 0

Dec Si

Loop

R_PRE0

R_RETN: POP CX

POP BX

POP AX

POP Si

RET

Receivenum ENDP

PROC NAME: ASCTOHEX

Function: Ascii to Hex Number

Parameter: dx = the first address of the 4 bytes That You want to conve convert

RetValue: ax = the hex number

NOTE: (1) No Error Handling

(2) Not (High High Low Low)

AsctoHex Proc

Push BX

PUSH CX

Push dx

Push Si

MOV CL, 4

MOV Si, DX; 1

MOV BX, Si

Call asctohex_byte

MOV AH, DL; AX: 0000 1111 0000 0000

Inc Si; 2

MOV BX, Si

Call asctohex_byte

MOV

Al

, DL; AX: 0000 1111 0000 2222

SHL

Al

, Cl; Ax: 0000 1111 2222 0000

SHL AX, Cl; Ax: 1111 2222 0000 0000

Inc Si; 3

MOV BX, Si

Call asctohex_byte

MOV DH, DL; DX: 0000 3333 0000 0000

INC SI; 4

MOV BX, Si

Call asctohex_byte; dx: 0000 3333 0000 4444

SHL DL, CL; DX: 0000 3333 4444 0000

SHR DX, Cl; DX: 0000 0000 3333 4444

MOV

Al

, DL; AX: 1111 2222 3333 4444

POP Si

POP DX

POP CX

POP BX

RET

AsctoHex Endp

; Proc Name: asctohex_byte

Function: Ascii to Hex Number by Byte

Parameter: bx = address of the byte That You want to conve convert

RetValue: DL = The Hex Number

NOTE: (1) No Error Handling

AskHEX_BYTE PROC

MOV DL, [BX]

CMP DL, '0'

JAE AE_0

JMP EXIT_P

AE_0: CMP DL, '9'

JBE BE_9

CMP DL, 'A'

JAE AE_DA

JMP EXIT_P

BE_9: SUB DL, 30H

JMP EXIT_P

AE_DA: CMP DL, 'Z'

JBE BE_DZ

CMP DL, 'A'

JAE AE_XA

JMP EXIT_P

BE_DZ: SUB DL, 37H

JMP EXIT_P

AE_XA: CMP DL, 'Z'

JBE BE_XZ

JMP EXIT_P

BE_XZ: SUB DL, 57H

EXIT_P: RET

AsctoHex_byte ENDP

; Proc name: HextodecASC

Function: Convert HEX Number TO ASCII STRING OF Decimal Number

Parameter:

Al

= The Hex Number You Want To Convert

Di = The base Pointer That The Result Will Save in, Buffer Size Must BE 2.

RetValue: 2 Bytes from the base point (di) in data segment

HEXTODECASC PROC

Push AX

PUSH CX

Push dx

Push di

MOV DL, 10

MOV CX, 2

H_next: xor ah, ah

Div DL

Add Al, 30H

MOV [di],

Al

INC DI

MOV DL, 1

MOV

Al

AH

Loop

H_next

POP DI

POP DX

POP CX

POP AX

RET

HEXTODECASC ENDP

; Proc name: HEXTODECASC5

Function: Convert HEX Number TO ASCII STRING OF Decimal Number

Parameter: dx = The Hex Number You want to conve convert

BX = The base Pointer That The Result Will Save IN, Buffer Size Must Be 5.

RetValue: di = the number of digit

; 5 BYTES from the base Pointer (bx) in data segment

NOTIABLE NUMBER MUST NOT BE APPEAR IN DATA Segment of Main Procedure

(2) The Tag of Segment In Main Procedure Must Be "DSEG"

HEXTODECASC5 PROC

DSEG_DENO Segment

Number DW 10000, 1000, 100, 10, 1DSEG_DENO ENDS

Push Si

Push AX

PUSH CX

Push dx

Push DS

XOR Si, Si

XOR DI, DI

MOV CX, 5

H5_Next: MOV AX, DX

MOV DX, DSEG_DENO

MOV DS, DX

XOR DX, DX

Div Word PTR [Si]

CMP

Al

0

JZ H5_ZERO

Add Al, 30H

Push BX

MOV BX, DSEG

MOV DS, BX

POP BX

MOV [BX] [DI], Al

INC DI

H5_ZERO: Add Si, 2

Loop

H5_Next

; MOV BYTE PTR [BX] [DI], 'M; SPCIAL in this Program

POP DS

POP DX

POP CX

POP AX

POP Si

RET

HEXTODECASC5 ENDP

; Proc Name: PrintCrlf

Function: set the next print position to next line

Parameter: (NONE)

PrintCrlf Proc

Push AX

Push dx

Mov Ah, 2H

MOV DL, 0DH

Int 21h

MOV DL, 0AH

Int 21h

POP DX

POP AX

RET

Printcrlf endp

CSEG Ends

End Start

Compilation of this language, as long as one put it, it is not easy to pick up. But by learning compilation, there is a deeper understanding of the underlying mechanism of the computer, and this understanding is not forgotten, and there is a great advantage for future use of advanced language.

The above, this applying a small program used for file segmentation is also written when I first studied the compilation. Some ideas may not be satisfactory, but also hope that the masters will give pointers.

Source code download address: http://9cbsgoodname008.51.net/file.zip

* ------------------------------------------- *

* Please inform the author and indicate the source, 9CBS welcomes you! *

* Author: Lu Peipei (goodname008) *

* Email: GoodName008@163.com *

* Column: http://blog.9cbs.net/goodname008 *

* ------------------------------------------- *

转载请注明原文地址:https://www.9cbs.com/read-79305.html

New Post(0)