; ; BIG.A86 ; Prints A User-Designated Message To The Screen In Large Letters ; ; Much of this code was lifted from the DOS program PRINTBIG.ASM by William ; Cravener, B/C Software, 520 North Stateline Rd., Sharon, PA 16146. The ; program is part of that author's FUNPACK2 archive, which contains various ; DOS programs with .ASM source code. Of these programs, the author states: ; ; "These files are placed in Public Domain and you are encouraged to use ; and share them as you see fit. No warranty or guarantee as to their ; proper operation is made. These programs are not for sale and are ; intended for your enjoyment or whatever. Most important are your ; comments, complaints and or compliments... ; ; "Assembly programming is my hobby and I would enjoy hearing from any ; other IBM assembly hobbyists out there in computerland. I would be ; interested in your programs, code and ideas. ; ; "Have fun!" ; ; CP/M-86 translation with extensive program alterations, modifications ; and redesign by Kirk Lawrence. While parts of the code are a bit ; "kludge-y," they work. Note that lower-case is not preserved in the ; user screen message. Because of the way CP/M-86 stores the command ; tail, all letters are capitalized. ; ; Syntax: BIG ; ; To compile: ASM86 BIG $ SZ PZ ; GENCMD BIG ; ; cseg org 100h jmp begin ; pos db 27,'Y'' $' synt db 13,10,' Syntax: BIG ',13,10,07,'$' tempx db 0 tempy db 0 store db 1Eh stat dw 0 seg_mt dw 0 hold db 0 ;storage for 8 bytes describing each of 10 characters ; begin: mov si,80h ;point SI to command line argument lodsb ;load a byte or al,al ;do we have an argument? jne chkvid ;yes, so go determine video type mov cl,9 ;function 9 - print string mov dx,offset synt ;point DX to 'syntax' message int 224 ;call BDOS xor cx,cx ;function 0 - reset system int 224 ;call BDOS chkvid: mov ah,15 int 10h cmp al,7 je out_vid mov store,1eh mov stat,3dah mov seg_mt,0b800h jmp lod1 out_vid: mov store,0fh mov stat,3bah mov seg_mt,0b000h lod1: mov bx,cs mov ds,bx push ds push bx push cx push dx push di mov bx,seg_mt ;video memory offset into BX mov ds,bx ;set data segment to video offset mov dx,0720h ;set color attribute in DH, ; character in DL mov cx,1920 ;set counter CX to 1920 characters mov di,0 ;set DI to start of video memory repeat: mov ds:[di],dx ;write attribute and character inc di ;move forward inc di ; ...and again loop repeat ;go write another character pop di pop dx pop cx pop bx pop ds ; dec si mov byte ptr [si],020h lod2: lodsb cmp al,0dh je over1 jmp lod2 over1: mov si,0fa6eh ;point ds:si to table in rom with dot mov ax,0f000h mov ds,ax mov di,offset hold mov bx,82h form: mov al,cs:[bx] ;load byte of message. cmp al,0dh je go_on xor ah,ah shl ax,1 shl ax,1 shl ax,1 push si add si,ax mov cx,8 rep movsb ;get 8 bytes from rom. pop si inc bx cmp bx,8eh jl form go_on: push cs pop ds output: push ax push bx push dx mov bh,0 ;find out where to put message mov ah,02 mov dx,0000h int 10h mov tempx,dh mov tempy,dl pop dx pop bx pop ax xor bp,bp loop1: mov si, offset hold add si,bp mov cx,10 loop2: lodsb mov bl,80h ;8 bytes loop3: push ax mov dl,32 and al,bl jz over4 mov dl,219 over4: call print ror bl,1 pop ax cmp bl,80h jne loop3 add si,7 loop loop2 inc bp cmp bp,8 jl loop1 return: mov cl,9 ;function 9 - print string mov dx,offset pos ;point to the cursor positioning sequence int 224 ;call BDOS xor cx,cx ;function 0 - reset system int 224 ;call BDOS ;----------------------------------------------- print: ;fast print out on screen push ax push bx push dx push di push es push dx mov ax,seg_mt mov es,ax mov dh,tempx mov dl,tempy inc tempy cmp tempy,79 jng overitz mov tempy,0 inc tempx overitz: xor bx,bx mov al,dh mov dh,0 mov di,dx mov bl,80 mul bx add di,ax shl di,1 pop dx cli mov al,dl mov ah,store push ax mov dx,stat w_low: in al,dx test al,1 jnz w_low w_high: in al,dx test al,1 jz w_high pop ax mov es:[di],al inc di push ax w_low2: in al,dx test al,1 jnz w_low2 w_high2: in al,dx test al,1 jz w_high2 pop ax mov es:[di],ah sti pop es pop di pop dx pop bx pop ax ret end