dos

Relative jump out of range by 0020h bytes

五迷三道 提交于 2019-12-12 16:24:03
问题 This question was migrated from Software Engineering Stack Exchange because it can be answered on Stack Overflow. Migrated 6 years ago . I had been trying to write a basic com file for a 'shell'. I was able to assemble the same code in NASM with little modifications. However this code won't assemble in TASM ! I get errors of the kind : Relative jump out of range I looked up a little on Google to find out about jumps. However I could not find much, except the idea to break this jump into

Hooking Int 09h interrupt

ⅰ亾dé卋堺 提交于 2019-12-12 14:52:29
问题 I have a problem hooking int 09h I've changed the pointer to my new Isr, if I debug on windows, the interrupt is triggered every time I push a key. But in VMWare it seems that only is triggered one time and no more. I've tested in DOS 6.22 and happens exactly the same. My code look like this: MyIsr: pusha pushf ;tell PIC that interrupt has finished mov al,0x20 out 0x20,al popf popa iret If I use a USB keyboard can I send the same commands like Ps/2? 回答1: There could be a number of issues here

Removing double quotes in a batch program in Windows 2003

隐身守侯 提交于 2019-12-12 05:58:44
问题 I'm just past a beginning batcher (probably more like a butcher) and have been fighting with this far too long (I've found some suggestions and tried them but can't seem to make any of them work - probably UE). I have a file on a Windows 2003 machine that I created in with a batch file (dir_list.txt) that looks like: "t001wp" "w003th" "b005ku" "k009dp" . . . . I want to strip out the double quotes. Thanks in advance for any help. 回答1: Search help for the "for" command and the answer is near

DOS INT 21H Function 0AH in nasm style

混江龙づ霸主 提交于 2019-12-12 05:24:52
问题 I am trying to use nasm to rewrite assembly programs in "IBM PC ASSEMBLY LANGUAGE AND PROGRAMMING" (15th edition) by Peter Abel. And here is the demo on buffering input, given on the page of 144, Chapter 8. The program is equivalent to the C programming char name[20]; scanf("Name?%s", &name); /*print the input name in the middle of the screen 25 * 80*/ .... My rewrite program is: ;file: A08CTRNM.asm segment data paralist: maxlen: db 20 ;The maximum length of the string will be 20 actulen:

How to delete NUL.LST file?

醉酒当歌 提交于 2019-12-12 04:57:24
问题 I believe that when I passed "NUL" as the Oracle sqlplus spool file name, that Oracle created the NUL.LST file. However, I have not yet found any way to delete this file? Any suggestions? M:>dir *.lst Volume in drive M is D Volume Serial Number is 904D-B54E Directory of M:\DW_Extract\Prod 2014-04-03 15:59 622 NUL.LST 回答1: The answer I used is from RealHowTo. Delete a file named "NUL" on Windows : C:\> rename \\.\C:\..\NUL. deletefile.txt C:\> del deletefile.txt I did not try sqlplus 'host del

javascript dos console cin like function witout prompt

我与影子孤独终老i 提交于 2019-12-12 04:56:13
问题 im creating a small javascript dos like console. i have the blinking bar,add typed text(without inputs,using body onkyup),print and cls. i wanted to implement a cin like function something like: bla = cin>>'write somthing' print('you wrote'+bla) ive got something working but its with prompt... console_p.jin= function(text) { console_p.jout(text); varval = prompt("bla"); return varval; }//end jin b=console_p.jin('write stuff'); console_p.jout("you wrote"+b);//"like print" it worlks fine but

Inplace sorting using Windows SORT Command

断了今生、忘了曾经 提交于 2019-12-12 03:30:05
问题 I am using Window 7's SORT command to SORT a .csv file , When i output the results to a separate csv file the command works fine but i need to do inplace sorting. The code is below. System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo startInfo= new System.Diagnostics.ProcessStartInfo(); startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; startInfo.FileName = "cmd.exe"; startInfo.Arguments = "/C sort C:\\Users\\fFayyaz\

Trouble when reverse and display string in assembly

时间秒杀一切 提交于 2019-12-12 02:44:00
问题 here is my code: model small stack 100h .data string1 db "Khoa$" string2 db 4 dup(?) count dw 4 .code begin: mov ax,@data mov ds,ax mov es,ax mov cx,count mov si,0 mov di,0 add di,count dec di again: mov al,string1[si] mov string2[di],al inc si dec di loop again mov ah,9 lea dx,string1 int 21h end begin in this part mov ah,9 lea dx,string1 int 21h when i try to display string1 to console, it's ok. but no result with string2. i'm new to assembly. Please help! 回答1: Although this is homework,

How to set (or correct for) timezone & DST in c (time.h functions) and DOS

强颜欢笑 提交于 2019-12-12 02:28:43
问题 I have a computer running DOS (freeDos 1.1) and plain C (compiled with Borland 5.0) with time.h . When I set the computer time using BIOS or the DATE and TIME DOS commands, there is no information about time zone. I set the time to my current time 10:25 AM. My C program does this... char timeString[80]; time_t timeT = time(NULL); strftime(timeString, sizeof(timeString), "%a %Y-%m-%d %H:%M:%S %Z", localtime(&timeT)); printf("%s\n", timeString); when I run the code I get the correct current

Test failure of DOS del D:\folder\*.ext

感情迁移 提交于 2019-12-12 02:15:59
问题 Is there something that can go instead of ??? here to make this work? del D:\folder*.ext if ??? goto fail Else what's the better way to branch in fail? I'm hoping there's better than using a FOR loop. 回答1: @echo off del "D:\folder\*.ext" if exist "D:\folder\*.ext" goto :fail goto :EOF :fail echo "D:\folder\*.ext" wasn't deleted pause 来源: https://stackoverflow.com/questions/16964000/test-failure-of-dos-del-d-folder-ext