mount
Well, since I took away your windows lab machines, here is an alternative. Doing these steps will let you run the assembler from Prof. Voerman on our linux machines under DOS emulation. - Greg
Log in on any lab linux box and put the floppy in the drive
Do your work. You can use the DOS edit command to edit your files
For more detail and more options (including how to use emacs to edit your assembler files) read on.
Insert the floppy
open a terminal and type the following command:1)
user@al83:~$ mount /dev/fd0
You should see the light on the floppy drive flash green.2)
Once the mount command returns a prompt the floppy is mounted. You can see under linux as /media/floppy0.3)
You have a choice here.4) If you want a new dos window for dosemu use the command:
user@al83:~$ xdosemu
otherwise to run it in the same terminal window (if running over an ssh session) use the command:
user@al83:~$ dosemu
Dosemu may ask you a question or two before it launches, once it does the floppy is “A:” and your home linux home directory is “D:”.
You can do all the work on the floppy or copy it to your home directory and do the work there. If you copy it you can work with the assembler when logged in remotely (where you will not have a floppy). To do this within dosemu, add a sub-directory to your cs325 directory. (You do have a ~/cs325 directory, don't you?) and copy the files there:
C:\> d: D:\> mkdir cs325\z80 D:\> a: A:\> copy *.* d:\cs325\z80\ HALT.ASM => D:\cs325\z80\HALT.ASM HALT.LST => D:\cs325\z80\HALT.LST HALT.OBJ => D:\cs325\z80\HALT.OBJ HALT.ROM => D:\cs325\z80\HALT.ROM . . . A:\>
Linux and DOSemu can both read and write to the floppy and to your home directory. As a result of this you can use emacs or other linux tools and programs to do your work.
In emacs if you create or open a file with an extension of “.asm” you will be put in Assembler mode when editing it but it does not know you intend to use this file under DOS. You need to tell emacs you want it to make a DOS text file. Do this by pressing ``Ctrl````x````Enter````f`` 5)
emacs will prompt you for the coding you want, type “dos”
Coding system for visited file (default, nil): dos
Now you can edit in emacs and compile in dosemu, just remember to save the file before you compile.
If you are curious as to what the rom file looks like you can view it as a hex dump using emacs hexl-mode. Open the file you want to view in emacs. Then press ``Esc````x``, and at the prompt at the bottom of the emacs window enter /!hexl-mode!/``Enter``. In emacs help and tutorials this would writen as /!M-x hexl-mode!/.
Once you are finished working, exit dosemu with the command “exitemu”:
A:\> exitemu
Please remember to unmount the floppy! You can remove it before you do, but if you forget to give the unmount command it will cause problems for the next person.
user@al80:~$ unmount /dev/fd0
Congratulations! You have just used Linux to emulate DOS and once there you ran a cross compiler so DOS would create code for the Z80! ( Bonus points if you can describe this in terms of signified and signifier.6) )
Hope this helps,
-Greg
— Greg Priest-Dorman 2008/03/01 21:59
mount
df -h