flat assembler
Message board for the users of flat assembler.

Index > DOS > Newbie : DOS program from a book wont run

Goto page Previous  1, 2, 3, 4, 5, 6  Next
Author
Thread Post new topic Reply to topic
radarblue



Joined: 10 Oct 2016
Posts: 44
Location: Norway, Oslo
radarblue 23 Nov 2016, 20:57
Thank you again Trinitek, for good advice . The Oracle Virtual Box is a strike of genious. I downloaded the IMdisk. Then I navigate in the File Explorer and find a suitable file, then right click, I can then select "Mount IMdisk Virtual Disk". My own textfiles dont work and I get a "Parameter is incorrect". However I can Mount programs like FASM onto a virtual image. I then need to format the Virtual floppy, but can only create a floppy from 1KB - 64KB in size.

When I load the Virtual Box. Insert the virtual floppy in the Storage tab, I disable Floppy as a startup device, then load Freedos. I type A:
Then write DIR as usual, then, 0 bytes found ... mmmmm. No files are found on the Floppy Image.

Maybe spend some time in the DEBUG in freedos, thanks to Ruxgulo. I see a PDF by the person Kip Irvine online .
Link : Kip Irvines DEBUG manual : http://kipirvine.com/asm/debug/Debug_Tutorial.pdf
Post 23 Nov 2016, 20:57
View user's profile Send private message Visit poster's website Reply with quote
system error



Joined: 01 Sep 2013
Posts: 670
system error 23 Nov 2016, 22:10
For running FASM in FreeDOS or anything similar in VM environment, I think u need a third party utility called "cwsdpmi" or something. Look it up.
Post 23 Nov 2016, 22:10
View user's profile Send private message Reply with quote
l_inc



Joined: 23 Oct 2009
Posts: 881
l_inc 24 Nov 2016, 00:42
radarblue wrote:
My own textfiles dont work and I get a "Parameter is incorrect". However I can Mount programs like FASM onto a virtual image.

That reminds me of a well-known story a system administrator once told about his girlfriend. He said, that without his girlfriend he would have never ever had found out that a type A usb plug had fit well into the RJ-45 jack.

P.S. Although it is not that surprising that an arbitrary file larger than 1KB can be treated as an unformatted floppy image.

_________________
Faith is a superposition of knowledge and fallacy
Post 24 Nov 2016, 00:42
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 24 Nov 2016, 02:58
radarblue wrote:
Ok. virtual machines is really wonderful, and most possible the future . However isolated from the ordinary OS files and programs. Now a question. How do I get online with Freedos ? with Lynx ... How do I install FASM to test some codes.


FreeDOS is not inherently network friendly, for the most part. There are some working pieces with a subset of basic functionality, but don't get your hopes up too high for a full HTML5/CSS3/Javascript stack. But I have successfully used ports of Dillo, Links2, Wget, and (mTCP) FTP .

The preferred "official" method at this late date is probably to use FD 1.2 (at least release candidate RC1). Jerome Shidel spent a lot of time on the installer and associated editions. Questions about this should only be directed to the mailing lists.

Otherwise I'd tell you to use the premade VM images from here (e.g. "FreeDOS 1.1net").

I have successfully run networking under VirtualBox 4.x and QEMU 2.x. However, VBox 5.1.8 (and similar 5.x series??) regressed and seemed to break networking. Not sure if recent 5.1.10 fixed it (doubt it), so that may make things a tiny bit harder. Obviously I recommend sticking with 4.x for now (until/if they fix it).

There are no DOS guest extensions for VBox. QEMU has partial "fat:" support. VMSMOUNT allegedly works for VMware. There still are old "2004 SP1"-era Virtual PC drivers on MS' website too, IIRC. Sharing files between host and guest OS is sadly not as easy as it sounds.

I really hate to direct you to any other solutions (although I can think of one of my own, also FreeDOS-based). You're already drowning in complexity here. Ah, computers, gotta love 'em!

Quote:

well I want to see the code run from the manual FASM for beginner page 12. Flat assembler programming tutorial . Its supposed to display the letter A. and I get a not supported 16 bit failure. doesnt run in DOSbox.


I'd be surprised if most code didn't run in DOSBox, but at the same time, they explicitly "only" target 486-era "games". But if some obvious simple things don't run there, it may be that you're incorrectly doing something that isn't supposed to work anyways.

Quote:

PS I was thinking of building a brand new Micro ATXmachine. I had NO idea it was gonna be a 32bit running a Real mode OS, with a DOS kernel. windows 95, win98 or win ME . More reasonably, as an ISO image on a VM . A question will be can win98 boot in Real mode inside the VM ? Microsoft has abandoned these products so the licence key wouldnt be a problem I guess.


The "real mode of Win98" is just MS-DOS 7. If your OS (e.g. Win7) still allows you to make a system floppy, you can have a very simple MS-DOS bootdisk (no full install, however, or most utils). You can still buy MS-DOS 6.x on MSDN Subscriber Downloads or whatever, but I don't recommend that. Just use FreeDOS, if you absolutely need or want "real mode" (DOS). Although, again, if all you want to do is learn (x64) assembly, Ray Seyfarth's book is probably a wiser, long-term solution.
Post 24 Nov 2016, 02:58
View user's profile Send private message Visit poster's website Reply with quote
Trinitek



Joined: 06 Nov 2011
Posts: 257
Trinitek 24 Nov 2016, 09:18
radarblue wrote:
Thank you again Trinitek, for good advice . The Oracle Virtual Box is a strike of genious. I downloaded the IMdisk. Then I navigate in the File Explorer and find a suitable file, then right click, I can then select "Mount IMdisk Virtual Disk". My own textfiles dont work and I get a "Parameter is incorrect". However I can Mount programs like FASM onto a virtual image. I then need to format the Virtual floppy, but can only create a floppy from 1KB - 64KB in size.
ImDisk adds an applet to the Windows control panel, and you can mount your images from there. Alternatively, you can mount them through the command prompt.
Post 24 Nov 2016, 09:18
View user's profile Send private message Reply with quote
radarblue



Joined: 10 Oct 2016
Posts: 44
Location: Norway, Oslo
radarblue 24 Nov 2016, 20:29
Quote:
Your`re already drowning in complexity here. Ah, computers, gotta love 'em!

Hahaha ! Thats Eternal man ! Very Happy

Yeah, I got the IM disk to function, but not into Freedos via VBox. Will try some other OS soon, XP runs and asks for a licence key, found a key online, but didnt pass . I got to spend some time on this, obviously . Its not just plug n play.

PS. the FASM does not load into the DOSbox, here. But some games do.

I guess the Seyfarths book on ASM X64 is ok. But Im not gonna abondont this concept due to complications, and most probably encounter new complications on the next platform ! Problems are everywhere Smile It has to be solved and understood. I see this as a project from a electrical perspective, and want to understand the chipsets and the CPU. It has taken generations of clever people to reach the state we are in.
Post 24 Nov 2016, 20:29
View user's profile Send private message Visit poster's website Reply with quote
Shahada



Joined: 25 Jul 2008
Posts: 77
Shahada 25 Nov 2016, 08:56
radarblue wrote:
PS. the FASM does not load into the DOSbox, here. But some games do.

If you load a DPMI host like cwsdpmi.exe or hdpmi32.exe before, both fasm and fasmd should run in DOSBox without any problem.
Post 25 Nov 2016, 08:56
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 25 Nov 2016, 09:27
radarblue wrote:

Yeah, I got the IM disk to function, but not into Freedos via VBox. Will try some other OS soon, XP runs and asks for a licence key, found a key online, but didnt pass . I got to spend some time on this, obviously . Its not just plug n play.


There shouldn't normally be much stuff needed to copy into the VM itself. And certainly trying to get XP at this point is a bogus idea. I didn't mean to discourage you from DOS, I thought it was somewhat obvious (guess not).

I forgot that one way to transfer files (with VBox + FreeDOS) was via FTPSRV. See here for explanation.

Also, as Trinitek said, you can create and attach .VHD in Computer Management / Disk Management (e.g. Win7). It gives you a virtual drive in Explorer to copy into and out of. It won't attach if created elsewhere, but you can at least read that .VHD image (once unmounted) with QEMU or VBox (although I haven't tried much).

Quote:

I guess the Seyfarths book on ASM X64 is ok. But Im not gonna abondont this concept due to complications, and most probably encounter new complications on the next platform !


Like I said, learning DOS atop Win64 is just asking for trouble. It's just easier to learn what's native, and his ebe debugger frontend apparently makes things lots easier.

P.S. VBox 5.1.10 does apparently fix networking, so it works (again).
Post 25 Nov 2016, 09:27
View user's profile Send private message Visit poster's website Reply with quote
radarblue



Joined: 10 Oct 2016
Posts: 44
Location: Norway, Oslo
radarblue 25 Nov 2016, 21:43
mhm. I dont know if this is relevant but it may be that loading a "user Virtual Disk" on a DOS kernel system is futile. It "May" only run a bootable floppy. the link provided is speaking of virtual boot and BIOS upgrades for Servers... the description says A virtual disk can do "various tasks" such as BIOS upgrades. It may be a built in disability to load a virtual disk on a virtual machine . but idunno. Not to mention the FAT12, FAT16, FAT32 and NTFS file systems . somewhere in the F1 help menu - file systems or Volumes and Drives it says DOS with a FAT12 system can not access a win 95/98/ME FAT32 file system. Due to long filenenames ( unless its a drive ...). however it DOES claim that 4DOS should support any file system ...

Link1 : Filesystems : https://technet.microsoft.com/en-us/library/cc938440.aspx

If a system tolerated Virtual load of OS, virtual disks and virtual HD, it would be a game changer. And a binary operator ( bitshifter ) to organise the different filesystems.

Link 2 : Microsoft on virtual disks : https://www.microsoft.com/resources/documentation/WindowsServ/2003/all/ADS/en-us/nbs_vf_overview.mspx?mfr=true

Concerning VHD Virtual Hard Drives. Guess it applies to a Platform that tolerates multiple disks, Win7 is as far as I know a NT kernel again. (free) Dos doesnt do additional drives. .atleast I didnt manage ... The Freedos documentation says that they are based on a DOS kernel. FTP, ok... have a look.

I got a failure on the FTPPASS.TXT in the MTCP. when doing ftpsrv.
think its better to go back afew steps, back to where it worked . its too much . DOS, FASM, EMU8086, the X86book, Freedos. Virtual Box, Debug .

Link 3 : plenty : http://www.intel-assembler.it/portale/indice.asp
Link 4 : winworld abandoneware : https://winworldpc.com
Post 25 Nov 2016, 21:43
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 04 Dec 2016, 22:50
radarblue wrote:
mhm. I dont know if this is relevant but it may be that loading a "user Virtual Disk" on a DOS kernel system is futile. It "May" only run a bootable floppy. the link provided is speaking of virtual boot and BIOS upgrades for Servers... the description says A virtual disk can do "various tasks" such as BIOS upgrades. It may be a built in disability to load a virtual disk on a virtual machine . but idunno. Not to mention the FAT12, FAT16, FAT32 and NTFS file systems . somewhere in the F1 help menu - file systems or Volumes and Drives it says DOS with a FAT12 system can not access a win 95/98/ME FAT32 file system. Due to long filenenames ( unless its a drive ...). however it DOES claim that 4DOS should support any file system ...


Right this second, I don't currently have enough time to walk you through it step-by-step. I already mentioned that I hadn't tested it much, but I have indeed successfully used a .VHD under VirtualBox with FreeDOS. Like I said, this allows you to use Explorer to copy into / out of the virtual disk.

Try again (Computer Management / Disk Management). If you still can't get it to work, I'll help you further later tonight.

Quote:

If a system tolerated Virtual load of OS, virtual disks and virtual HD, it would be a game changer. And a binary operator ( bitshifter ) to organise the different filesystems.


Windows now has such support, especially editions like Win8 (64-bit, Pro, VT-X), which has Hyper-V. The older software-only emulation products like Virtual PC are probably? discontinued (since 2011?).

Quote:

Concerning VHD Virtual Hard Drives. Guess it applies to a Platform that tolerates multiple disks, Win7 is as far as I know a NT kernel again. (free) Dos doesnt do additional drives. .atleast I didnt manage ... The Freedos documentation says that they are based on a DOS kernel. FTP, ok... have a look.


DOS handles multiple drives just fine (though handling .VHD, .VMDK, etc. is up to the hypervisor).

Quote:

I got a failure on the FTPPASS.TXT in the MTCP. when doing ftpsrv.
think its better to go back afew steps, back to where it worked . its too much . DOS, FASM, EMU8086, the X86book, Freedos. Virtual Box, Debug .


I never needed FTPSRV, but I think there's a bug in his 2013 version that he fixed in 2015 edition, so download and try that instead.
Post 04 Dec 2016, 22:50
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 05 Dec 2016, 22:51
rugxulo wrote:

Try again (Computer Management / Disk Management). If you still can't get it to work, I'll help you further later tonight.


Well, here's a weak attempt at a tutorial:

Quote:

Win 7 (Home, 64-bit):
=====================
Win key - (search) "computer management"
click "Storage -> Disk Management"
click the Volume window
right click Disk Management -> Create VHD (or via menu "Action")
(here I'm making a 4096 MB dynamic disk)
Action -> All Tasks -> Initialize (MBR)
Action -> All Tasks -> New Simple Volume (mount as drive G:, FAT32, quick format)
Explorer -> cut and paste any files from C: to G: (e.g. hello.txt)
right click "Disk 1" -> "Detach VHD"

VirtualBox 4.3.40 (64-bit):
===========================
on existing "FreeDOS" install, click Storage -> Controller: IDE -> click button "Add Hard Disk" (existing)
boot "FreeDOS" normally (and edit hello.txt)
quit the VM (Host-Q, aka Right Ctrl-Q)
Storage -> Remove Attachment

...
back to running Computer Management -> Disk Management
Attach VHD
back to Explorer -> G: -> read your modified hello.txt
when finished, Detach VHD


EDIT: FreeDOS 1.2 RC2 is out (and presumably final will be released by the end of the month).

EDIT #2: 7-Zip (e.g. 7z and presumably [GUI] 7zFM) can also extract from certain VM images (e.g. .VHD) nowadays.

EDIT #3: Ulrich Hansen already had a nice tutorial (with screenshots) on how to Mount the image file (Win or Mac).


Last edited by rugxulo on 09 Dec 2016, 16:58; edited 1 time in total
Post 05 Dec 2016, 22:51
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 08 Dec 2016, 19:33
While I'm waiting for you to report back, let me clarify a bit:

radarblue wrote:
Not to mention the FAT12, FAT16, FAT32 and NTFS file systems . somewhere in the F1 help menu - file systems or Volumes and Drives it says DOS with a FAT12 system can not access a win 95/98/ME FAT32 file system. Due to long filenenames ( unless its a drive ...). however it DOES claim that 4DOS should support any file system ...


Original IBM PCs didn't even have hard drives (or maybe it was optional for more money, can't remember). FAT12 was fine back then, maxing out at roughly 32 MB. Only later did FAT16 come around, but even that is limited to 2 GB per partition (although you can have up to four primary). Classic DOSes like MS-DOS 6.22 and DR-DOS 7.03 (which pretends to be IBM PC-DOS 6.00 for compatibility) don't support beyond FAT12 and FAT16.

FAT32 came later with Win95 (OSR1 or whatever), aka MS-DOS 7.10. Also, some third-party DOS clones eventually added support as well. FreeDOS also supports FAT32, for instance. The main advantage is (almost) no more limit on size, so it can be well beyond 2 GB per partition. Granted, DOS is still real mode, so it can be unbearably slow trying to access partitions larger than a certain size, which is (allegedly) why Windows refuses to "create" a FAT32 partition larger than 32 GB. (And of course, for "security", newer Windows like Vista won't even boot from atop FAT anymore.)

Long filenames are a separate issue and not directly related to FAT at all. (VFAT is just an ugly hack / kludge atop pre-existing FAT, you don't need it, and it's not really a separate group of file systems.)

4DOS is just a shell, not part of the kernel but instead userland, and it has nothing to do with any file systems (barring a few specific software interrupt calls). In other words, 4DOS shouldn't be directly accessing disks (low-level) anyways, instead relying solely on the host OS (DOS).

Quote:

Win7 is as far as I know a NT kernel again. (free) Dos doesnt do additional drives. .atleast I didnt manage ... The Freedos documentation says that they are based on a DOS kernel. FTP, ok... have a look.


Win2000 is NT 5.0, successor to NT 4.0 (1996?). XP is 5.1, Vista is 6.0, Win7 is actually 6.1 (etc. etc. etc.). Unlike Win9x, it's not directly based upon 16-bit DOS at all, so (at best) you only have fake NTVDM (32-bit editions only).

And yes, FreeDOS is a 16-bit DOS (only) although I'll admit that even if we pretend that such a compatibility is obvious, keep in mind that many names are misleading or overused, so "disk operating system" can mean many ambiguous things.
Post 08 Dec 2016, 19:33
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 01 Jan 2017, 18:00
Okay, just to state the obvious, FreeDOS 1.2 (final) has been released, along with a revamped website. Thanks to Jim, Jerome, and Mateusz for their efforts.

EDIT: http://www.freedos.org/install/ seems very helpful if you need step-by-step instructions (although the actual installer is fairly straightforward).
Post 01 Jan 2017, 18:00
View user's profile Send private message Visit poster's website Reply with quote
radarblue



Joined: 10 Oct 2016
Posts: 44
Location: Norway, Oslo
radarblue 14 Jan 2017, 10:06
I realize I need some more training. So at the moment I am concentrating on C. Bought in an Arduino to practice on some electronics too. it is very fun. in C, I wanted to do graphix on the console screen (like sinus curves and triangles), and more or less all searches ended up with "welcome to Windows API, C++, WPF, .NET and MFC". and I looked at it, didnt understand a thing ... alot of wierd handlers and fancy instructions. I decided to discard the win32 API for the moment.

Found some websites that have example codes on sinus and grids. gonna practice there for a good while. anyways happy newyear. You are a fine crew of people ! cheers.

believe it or not there is quite a differance, in the electrical diciplines High voltage 1megaV - 400kV - 11kV, to domestic voltage (electrician) 230V-110V and low voltage (computer logic) of 5V. Althou the components are the same.
Post 14 Jan 2017, 10:06
View user's profile Send private message Visit poster's website Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville 15 Jan 2017, 21:58
radarblue wrote:
Althou the components are the same.
radarblue fyi: all electrical and electronic components are manufactured with a specified voltage rating (as well as other ratings like power dissipation etc). The higher the voltage rating, the bigger physically the component has to be. So you will not find a 400kV rated resistor in a 5V circuit! All components are not the same, even if they might have, for example, the same resistance. Wink

_________________
FAMOS - the first memory operating system
Post 15 Jan 2017, 21:58
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 26 Jan 2017, 20:55
system error wrote:
32-bitness is not going anywhere anytime soon.


Another one bites the dust:

Arch Linux Preparing To Deprecate i686 Support
Post 26 Jan 2017, 20:55
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 03 Feb 2017, 00:15
In other 32-bit news: Apple to end support for 32-bit iOS apps

Also, the FreeDOS Wiki has been updated. Chapter 6 now also shows how to (offline) mount .VHD under GNU/Linux (Ubuntu 16.04 LTS using libguestfs-tools).
Post 03 Feb 2017, 00:15
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 07 Feb 2017, 00:45
In other 32-bit news: Tails 3.0 will require a 64-bit processor

I really hate to keep harping on this (and probably won't post more news regarding it), but this is just the way of the world. Thus, obsoletion happens sooner than most of us would normally like.
Post 07 Feb 2017, 00:45
View user's profile Send private message Visit poster's website Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville 07 Feb 2017, 01:40
rugxulo wrote:
Thus, obsoletion happens sooner than most of us would normally like.
Yes, due to planned obsolescence by the manufacturers, driven by commercial imperatives, so we have to keep replacing perfectly good hardware Sad

_________________
FAMOS - the first memory operating system
Post 07 Feb 2017, 01:40
View user's profile Send private message Visit poster's website Reply with quote
Trinitek



Joined: 06 Nov 2011
Posts: 257
Trinitek 07 Feb 2017, 01:43
neville wrote:
rugxulo wrote:
Thus, obsoletion happens sooner than most of us would normally like.
Yes, due to planned obsolescence by the manufacturers, driven by commercial imperatives, so we have to keep replacing perfectly good hardware Sad
It's not good hardware if it's designed to fail.
Post 07 Feb 2017, 01:43
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4, 5, 6  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.