Showing posts with label DOS. Show all posts
Showing posts with label DOS. Show all posts

February 28, 2012

Print DOS Application With Windows Printer

Problem
- How can i print with laser and inkjet printers with MS-DOS Application
- How to print with old DOS programs

Solution A
The DOSPRN can help you ;-)
Site: www.dosprn.com
FAQ: www.dosprn.com/faq.htm

Solution B
Download the PRN2FILE and run it in DOS mode. This resident DOS application converts the print task to PRN file.
You can use of below command for save print task in 1.PRN.
Command: prn2file.com C:\1.PRN
For start automatically in each start command in windows you can append the above command in end of %windir%\system32\autoexec.nt file.
Site: cejvik.xf.cz/prilohy/dos_usb_print_prn/
Link ver1.0: cejvik.xf.cz/prilohy/dos_usb_print_prn/prn2file.zip
Link ver1.0: http://www.4shared.com/rar/j2SARDvj/20120228-prn2file.html
Link ver1.1 (+modification):  ftp://ftp.simtel.net/pub/simtelnet/msdos/printer/prn2fil3.zip
Link ver1.1 (+modification):  http://www.4shared.com/zip/r9vT8VwT/20120303-prn2file11.html

Usage (v1.0): PRN2FILE [path][filename][/Pn][/Bnn][/F][/A][/U]
Run PRN2FILE with the desired filename to activate it.
Run it with a different filename to change destination file.
/P to designate the printer number (defaults to 1)
/B to enter buffer size in K bytes (defaults to 4)
/F to print just to file and not to printer (default is both) [in v1.1 only]
/A to append to file (default is to create new file) [in v1.1 only]
/U to uninstall the program

September 13, 2011

This system does not support fullscreen mode

Errors:
- Full screen mode for DOS programs in Windows 7
- No full screen mode for DOS programs?
- This system does not support fullscreen mode. Error in windows 7.
- I am supposed to run an old DOS program on my Windows 7 OS But ...
- There is no FullScreen DOS in Windows 7
- Full-screen problem in CMD.EXE and COMMAND.EXE




Solution 1:
You can use of DOSBOX which is an open source DOS emulator.

Solution 2:
You can disable your Display Adapter from Device Manager.

Solution 3:
You can disable your Display Adapter with DEVCON command-line utility in batch file or likes.
DEVCON help: link
DEVCON download: link
DEVCON sample: link

February 23, 2000

Assembly Project - Screen and Type


Language: x86 32-bit Assembly Language
Subject: Present the keyboard type character in separated spaces
Download Link: https://googledrive.com/host/0BwXeZl7ISTIXTlJpU09UWUZMTGM/
Download  Name: Term00-Assembly-Screen
Source Code:
sseg segment stack 'stack'
sseg ends

dseg segment 'data'
   numrow  db 00d
   charrow db 00d
   elserow db 00d
   numcol  db 00d
   charcol db 27d
   elsecol db 54d
   id      db ?
   char    db 20h
dseg ends

cseg segment 'code'
   assume ds:dseg, es:dseg, ss:sseg, cs:cseg
main proc far
   mov ax, dseg
   mov ds, ax
   mov es, ax
   mov ax, sseg
   mov ss, ax
   call clrscr
start:
   call getch
   cmp char, 27d
   jz eop
   call iden
;   mov al,id
;   mov char,al
;   add al, 30h
   cmp id, 0h
   jz num
   cmp id, 1h
   jz chr
   cmp id, 2h
   jz els
   cmp id, 3h
   jz error

num:
   call numbers
   jmp start
chr:
   call characters
   jmp start
els:
   call elses
   jmp start
error:
   jmp start

eop:
   mov ah, 4ch
   int 21h
main endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
clrscr proc near
   ;------------
   mov ah, 6h
   mov al, 0h
   ;-Red-------
   mov bh, 4fh
   mov cx, 0000h
   mov dx, 1819h
   int 10h
   ;-Green------
   mov bh, 2fh
   mov cx, 001Bh
   mov dx, 1834h
   int 10h
   ;-Blue-------
   mov bh, 1fh
   mov cx, 0036h
   mov dx, 184fh
   int 10h
   ;-NULL------
   mov ah, 6h
   mov bh, 00h
   mov al, 0h
   mov cx, 001Ah
   mov dx, 181Ah
   int 10h
   mov cx, 0035h
   mov dx, 1835h
   int 10h
   ;-----------
   ret
clrscr endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
getch proc near
   mov ah, 07h
   int 21h
   mov char, al
   ret
getch endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iden proc near
   cmp char, 30h
   jl else1
   cmp char, 39h
   jg next
   mov id, 0h
   ret

next:
   cmp char, 41h
   jl else1
   cmp char, 5ah
   jg next1
   mov id, 1h
   ret

next1:
   cmp char, 61h
   jl else1
   cmp char, 7ah
   jg else1
   mov id, 1h
   ret

else1:
   cmp char, 21h
   jl end1
   cmp char, 7eh
   jg end1
   mov id, 2h
   ret

end1:
   mov id, 3h
   ret
iden endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
numbers proc near
   inc numcol
   cmp numcol, 26d
   jg nextn
putn:
   mov dh, numrow
   mov dl, numcol
   call setcursor
   mov bl, 4fh
   call putchar
   ret
nextn:
   cmp numrow, 24d
   jz scrolldwnn
   inc numrow
   sub numcol, 26d
   jmp putn
scrolldwnn:
   mov ah, 6h
   mov bh, 4fh
   mov cx, 0000h
   mov dx, 1819h
   mov al, 1h
   int 10h
   sub numcol, 26d
   jmp putn
numbers endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
characters proc near
   inc charcol
   cmp charcol, 53d
   jg nextc

putc:
   mov dh, charrow
   mov dl, charcol
   call setcursor
   mov bl, 2fh
   call putchar
   ret

nextc:
   cmp charrow, 24d
   jz scrolldwnc
   inc charrow
   sub charcol, 26d
   jmp putc

scrolldwnc:
   mov ah, 6h
   mov bh, 2fh
   mov cx, 001Bh
   mov dx, 1834h
   mov al, 1h
   int 10h
   sub charcol, 26d
   jmp putc

characters endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
elses proc near
   inc elsecol
   cmp elsecol, 80d
   jg nexte

pute:
   mov dh, elserow
   mov dl, elsecol
   call setcursor
   mov bl, 1fh
   call putchar
   ret

nexte:
   cmp elserow, 24d
   jz scrolldwne
   inc elserow
   sub elsecol, 26d
   jmp pute

scrolldwne:
   mov ah, 6h
   mov bh, 1fh
   mov cx, 0036h
   mov dx, 184fh
   mov al, 1h
   int 10h
   sub elsecol, 26d
   jmp pute
elses endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
setcursor proc near
   dec dl
   mov bh, 0h
   mov ah, 02h
   int 10h
   ret
setcursor endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
putchar proc near
   mov ah, 09h
   mov bh, 0h
   mov cx, 1h
   mov al, char
   int 10h
   ret
putchar endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
cseg ends

end main




January 31, 2000

Assembly Project - Floppy Disk Copy Project


Language: x86 32-bit Assembly Language
Download Link: https://googledrive.com/host/0BwXeZl7ISTIXTlJpU09UWUZMTGM/
Download  Name: Term00-Assembly-DiskCopy.rar
Source Code:
.286
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
stk segment stack
    dw 100h
stk ends
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
dat segment
    ;;;;;;;;;;;;;;;;;;;Print out
    data_sector_0 db 512 dup(?)
    serial_number db 12h,34h,17h,0E5h
    str1   db  40  dup ("Lable  orginal DISK          : Amir__Mehdi$")
    str2   db  40  dup ("Serial number   orginal DISK : 1234-17E5$")
    str3   db  40  dup ("Serial  orginal DISK : $")
    str4   db  30  dup ("Lable           this DISK : $")
    str5   db  30  dup ("Serial  this DISK : $")
    str6   db  30  dup ("--------This floppy disk is $")
    str7   db  16  dup ("ORGINAL--------$")
    str8   db  18  dup ("UNORGINAL--------$")
    ;;;;;;;;;;;;;;;;;;;Print out
    EEnter db  10,13,'$'
    SSpace db  32,'$'
    SStar  db  '*','$'
dat ends
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
cod segment 'code'
assume cs:cod,ds:dat,ss:stk
    main:
       ;;;;;;;;;;;;;;;;;;;fill data segment
       mov ax,dat
       mov ds,ax
;#####################################################
;##################Draw Background####################
;#####################################################
       ;;;;;;;;;;;;;;;;;;;Clrscr
       mov al,25
       mov bh,0
       mov cx,0000h
       mov dx,2580h
       mov ah,07h
       int 10h
       ;;;;;;;;;;;;;;;;;;;gotoxy(x,y)
       mov bh,0
       mov dx,0000h
       mov ah,02h
       int 10h
       ;;;;;;;;;;;;;;;;;;;Read sector 0 diskete
       mov bx,offset data_sector_0
       mov al, 00h                 ;number drive
       mov cx, 01h                 ;num head
       mov dx, 00h                 ;number sector
       int 25h
;#####################################################
;###################Output Data#######################
;#####################################################
       ;;;;;;;;;;;;;;;;;;;Write str1
       mov dx,offset str1
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Enter
       mov dx,offset EEnter
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Write str2
       mov dx,offset str2
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Enter
       mov dx,offset EEnter
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Write str3
       mov dx,offset str3
       mov ah,09h
       int 21h
       mov bx,offset serial_number+4
       mov byte ptr [bx],'$'
       mov dx,offset serial_number
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Enter
       mov dx,offset EEnter
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Star
       mov dx,offset SStar
       mov cx,40
       l2 :
       mov ah,09h
       int 21h
       loop l2
       ;;;;;;;;;;;;;;;;;;;Enter
       mov dx,offset EEnter
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Write str4
       mov dx,offset str4
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Write sector 0 lable
       mov bx,offset data_sector_0+43+11
       mov byte ptr [bx],'$'
       mov dx,offset data_sector_0+43
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Enter
       mov dx,offset EEnter
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Write str5
       mov dx,offset str5
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Write sector 0 serial
       mov bx,offset data_sector_0+39+4
       mov byte ptr [bx],'$'
       sub bx,4
       mov dx,bx
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Enter
       mov dx,offset EEnter
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;gotoxy(x,y)
       mov bh,0
       mov dx,0E0Eh
       mov ah,02h
       int 10h
       ;;;;;;;;;;;;;;;;;;;Write str6
       mov dx,offset str6
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Compaire sairal number
       mov si,offset data_sector_0+39-1
       mov di,offset serial_number+3 +1
       mov cx,4h
       l3:
       inc si
       sub di,1
       mov ah,[si]
       mov bh,[di]
       cmp ah,bh
       jne l4
       loop l3
       ;;;;;;;;;;;;;;;;;;;Write str7
       mov dx,offset str7
       mov ah,09h
       int 21h
       jmp l5
       ;;;;;;;;;;;;;;;;;;;Write str8
l4:    mov dx,offset str8
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Enter
l5:    mov dx,offset EEnter
       mov ah,09h
       int 21h
       ;;;;;;;;;;;;;;;;;;;Exit of program
       mov ah,4ch
       int 21h
cod ends
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end main