;-split.asm------------------------------------------------------------------ ; x86 - Dos - Assembly Language Programming ; ; ; ; Written by: John A Lyons ; ; Email : sysop@megablast.8k.com ; ; Page : http://www.megablast.8k.com/asm.html ; ; Compiler : Tasm v4 (Borland Turbo Assembler), available from above page. ; ; Date : Saturday, October 09, 1993 2:13:00 PM ; ; Purpose : Splits a file, entered on the command line, into 65k chunks. ; ; This can be changed internally. ; ; ; ;---------------------------------------------------------------------------- ; ;C:\ASM\SOURCE\SPLIT>[QE] tasm split.asm; ;Turbo Assembler Version 4.0 Copyright (c) 1988, 1993 Borland International ; ;Assembling file: split.asm ;Error messages: None ;Warning messages: None ;Passes: 1 ;Remaining memory: 425k ; ; ;C:\ASM\SOURCE\SPLIT>[QE] tlink /t split; ;Turbo Link Version 7.1.30.1. Copyright (c) 1987, 1996 Borland International ; ;C:\ASM\SOURCE\SPLIT>[QE] split ; cseg segment assume cs:cseg, ds:cseg org 100H .286c jumps main proc far mov sp,offset stk mov ah,4ah mov bx,(offset stk-offset main+10fh)/16 int 21h mov ah,48h mov bx,2000h int 21h jc theend mov cs:[room],ax push es mov di,82h mov si,0 mov ax,0b800h mov es,ax nothere: mov ah,cs:[di] mov es:[si],ah add si,2 inc di cmp ah,0dh jne nothere mov cs:[di-1],byte ptr 0 pop es mov ax,3d00h mov dx,82h int 21h jnc works jmp theend works: mov cs:[hand1],ax restart: push cs pop ds mov di,82h lea si,name2 cont1: mov ah,cs:[di] mov cs:[si],ah inc di inc si cmp cs:[di],byte ptr 0 jne cont1 mov ah,cs:[counter] cmp ah,9 jbe num1a add ah,'A'-10 jmp num1b num1a: add ah,'0' num1b: mov cs:[si-1],ah mov cs:[si],byte ptr 0 mov cs:[si+1],0d0ah mov cs:[si+3],byte ptr '$' mov ah,9h lea dx,name2 int 21h mov ah,3ch mov cx,0 lea dx,name2 int 21h mov cs:[hand2],ax mov cx,1 john1: push cx push ds mov ah,3fh mov bx,cs:[hand1] mov cx,0ffffh mov ds,cs:[room] xor dx,dx int 21h mov cx,ax mov ah,40h mov bx,cs:[hand2] mov ds,cs:[room] xor dx,dx int 21h pop ds pop cx cmp ax,0ffffh je gook1 jmp theend gook1: loop john1 mov ah,3fh mov bx,cs:[hand1] mov cx,1 mov ds,cs:[room] xor dx,dx int 21h mov cx,ax mov ah,40h mov bx,cs:[hand2] mov ds,cs:[room] xor dx,dx int 21h mov ah,3eh mov bx,cs:[hand2] int 21h inc cs:[counter] jmp restart theend: mov ah,3eh mov bx,cs:[hand1] int 21h mov ah,3eh mov bx,cs:[hand2] int 21h mov ah,49h mov es,cs:[room] int 21h mov ah,4ch int 21h main endp room dw 0 name2 db 32 dup(0) counter db 0 hand1 dw 0 hand2 dw 0 newstack db 5 dup("JL.JL.") stk equ $ cseg ends end main