dos

Taking an Assembly Course, Stuck in DOS!

五迷三道 提交于 2019-12-23 08:51:30
问题 I'm taking a course on Microprocessor Programming as part of my Electronic Engineering degree. Unfortunately, in the labs, we have to work in DOS using MASM. Now, I don't really find DOS a hindrance, but I just don't have it on a computer at home (and none of the computers that I have have floppy drives), so I am unable to practice writing programs. I have tried under Windows, but it just doesn't assemble (I am guessing this is because of Protected Mode). Any advice on what should I do?

What's wrong with following assembly code?

怎甘沉沦 提交于 2019-12-23 04:45:41
问题 code to take input string assemble using nasm on windows machine: nasm file.asm -o file.com ;read the string mov ah,0x0A ;read mov dx,buffer ;pointer to buffer int 0x21 ;newline mov ah,2 mov dl,10 int 0x21 mov dl,13 int 0x21 ;put $ sign at end of string mov bx,buffer+1 mov dx,buffer+2 add dl,byte[bx] mov bx,dx mov byte[bx],'$' ;output mov dx,buffer+2 mov ah,9 int 0x21 ;exit mov ah,0x4c int 0x21 ;buffer buffer: db 255 ;len of buffer db 0 ;num of char read db 255 ;actual string ;###############

How to use MS-DOS Commands to cut paper using ESC/POS commands?

人盡茶涼 提交于 2019-12-23 02:53:09
问题 I have a simple requirement of printing text files from Windows (MS-Dos). Let's assume that my normal text file resides on "C:\Temp" folder. On the other hand, I have a EPSON TM88V receipt printer. I am able to shake hand with receipt printer connected on USB and able to print it with below command: C:\Temp> PRINT /D:\WORKSTATION\EPSONTM-T88V C:\Temp\HelloWorld.txt Though it's printing; but it's not cutting the paper. I need to insert those ESC/POS commands in my text file and pass it on to

How to use MS-DOS Commands to cut paper using ESC/POS commands?

我们两清 提交于 2019-12-23 02:53:06
问题 I have a simple requirement of printing text files from Windows (MS-Dos). Let's assume that my normal text file resides on "C:\Temp" folder. On the other hand, I have a EPSON TM88V receipt printer. I am able to shake hand with receipt printer connected on USB and able to print it with below command: C:\Temp> PRINT /D:\WORKSTATION\EPSONTM-T88V C:\Temp\HelloWorld.txt Though it's printing; but it's not cutting the paper. I need to insert those ESC/POS commands in my text file and pass it on to

How to obtain Server.MapPath() formatted with short names (8.3 MS-DOS format)?

自作多情 提交于 2019-12-22 19:44:21
问题 I am using Process.Start to run a console application on the ASP.NET server and the parameters of the program need a path that is formatted in the old MS-DOS 8.3 format. For example in a console name of the folders in this format can be obtained by typing "dir /X": How can I obtain Server.MapPath() formatted with the short names version(8.3 MS-DOS format) of the folder names? 回答1: This is not available as managed API... You will need to use P/Invoke and call GetShortPathName on the result of

How to obtain Server.MapPath() formatted with short names (8.3 MS-DOS format)?

左心房为你撑大大i 提交于 2019-12-22 19:42:59
问题 I am using Process.Start to run a console application on the ASP.NET server and the parameters of the program need a path that is formatted in the old MS-DOS 8.3 format. For example in a console name of the folders in this format can be obtained by typing "dir /X": How can I obtain Server.MapPath() formatted with the short names version(8.3 MS-DOS format) of the folder names? 回答1: This is not available as managed API... You will need to use P/Invoke and call GetShortPathName on the result of

How do I exclude specific file names from an MS DOS dir list?

穿精又带淫゛_ 提交于 2019-12-22 18:18:00
问题 I am creating an MS DOS batch script that needs to list every .bat file in the current directory, but not show autoexec.bat or other utilities or systems .bat files that shouldn't be run by the user. I currently have DIR "*.bat" /B /P This lists all .bat files appropriately, but it shows autoexec.bat. How would I exclude that from the list? Also slightly important, how could I chop off the file extensions and show more than the 7-characters DOS limits files to? Constraints: I am not able to

How do I get full Win32 path from 8.3 DOS path with Perl?

喜欢而已 提交于 2019-12-22 12:44:09
问题 My question basically says it all. I am getting this: C:\DOCUME~1\frew\MYDOCU~1\Code\AIRCRA~1\lib\ACD\VALIDA~1.PM and I want this: C:\Documents and Settings\frew\My Documents\Code\aircraft_ducting\lib\ACD\Validators.pm I looked at File::Spec::Win32 but that didn't seem to have anything that would do the trick. Ideas? Thanks! 回答1: You can use Win32::GetLongPathName($path) from the Win32 module. 回答2: Win32::GetLongPathName() is all you need. 来源: https://stackoverflow.com/questions/770171/how-do

How to call DOS Interrupts within a C/C++ program using Inline Assembly?

风格不统一 提交于 2019-12-22 11:34:08
问题 I need to call some DOS interrupts (Services) from a C/C++ program, I tried the following inline asm code: (Read a character) int main() { asm( "movb $0x01, %ah;" "int $0x21" ); system("PAUSE"); } But it did not work ! I would like to know what have i done wrong here ! Also if there is another way to call dos interrupts ! Thank You ! 回答1: You can only use DOS interrupts from DOS programs, so to make this work, you'd need a really ancient C++ compiler like Visual C++ 1.0 or 1.5, or Turbo C++

dos call和start的更多使用方法

可紊 提交于 2019-12-22 05:42:12
那么,在执行b.bat的时候,会将hello赋值给%1,而%0代表a.bat自己。 (在批处理中,可以使用%*代表所有参数%1-%9代表9个参数,%0代表批处理自己,其扩展用法见call /?,在讲for的时候也会讲到) 在这里讲下goto :eof的用法,如: a.bat内容: @echo off echo %0 %1 goto :eof b.bat内容: @echo off call a.bat hello dir c:\ pause 这里,在显示完hello后,会执行dir c:\并暂停,如果将goto :eof改成exit,在显示完hello后就会自动退出。因为goto :eof后会转到a.bat结尾,即只退出a.bat然后会继续执行dir;由于call a.bat,在执行a.bat和b.bat是一个CMD窗口,exit的话就会直接退出这个窗口,这就是goto :eof和exit区别。 来源: https://www.cnblogs.com/gyzhouyong/p/4882728.html