Jump to content
IGNORED

File format in Classic 99


senior_falcon

Recommended Posts

I'd like to be able to use a word processor to create and modify assembly language source files with Classic 99. I have checked the box for "Write all DV files as Windows Text" and the box for "Read Windows Text as DV files". So far I have been unable to use Classic 99 to read files created with a word processor in windows. I've tried both with and without the .txt extension. I can read a file saved from Classic 99 (sometimes I have to add a .txt extension to it) but there is always a line or two or garbage at the bottom.

 

Can this be done? If so, what am I missing?

 

Thanks!

Link to comment
Share on other sites

I think a word processor will probably generate files of a type that classic99 cannot identify as being text files. For example, a .doc file is not a text file, as there will be a lot of additional information in the file (fonts in use, and other formatting related data) that makes no sense to classic99.

 

Classic99 should work okay with raw text files: That is, files with a .txt extension, created with a text editor (not a word processor) such as windows notepad, or my favourite, Notepad++.

 

See section 5.3.1 in the Classic99 docs:

 

5.3.1 FIAD

Using the FIAD method of file storage, each TI file is a separate file on your PC harddrive (or any other file

device). Classic99 can be configured to access any file that your system normally can access. By default it can

read both TIFILES and V9T9 files, as well as Windows text files if they have the appropriate extension (as DF80

or DV80). It can also import non-TI files without adding a header, automatically using DF128 format, which is the

same format that would have been used if you had downloaded the file to the TI via Xmodem. Configuration

options let you disable any of these options if they are problematic.

 

FIAD-Windows Text

Windows text files may be accessed as well, so long as the open mode is Display, and the record length is 80

characters. (Additional options allow flexibility on the record length, as well as whether this option is enabled at

all see the Classic99.ini section for details.) Windows text files are recognized by extension, in order to work

the extension must be one of: .TXT, .OBJ, or .COB. By default, Classic99 will only read Windows text files, but it

may also be configured to write them.

 

 

Hope this helps.

Link to comment
Share on other sites

My favorite editor is jedit. Then again I am biased as I am a java developer.

 

Anyways, you can save as a text file from word processors. It will warn you that you will not save any special formatting if you happened to bold something for example.

 

I often take documents that people sent me and save them as text files that can be opened in a text editor.

Link to comment
Share on other sites

My personal favourite method is to use just the simple Notepad in Windows with the font set to a fixed width (I use FixedSys font)

 

I have also tried in vain to get a textfile to be read/written by Classic99 as an image, but then, that sort of thing is not really what I do best.

I simply copy from Notepad and Paste into the Classic99 then save as a program image.

Link to comment
Share on other sites

You really want to stay away from "word processors" for writing code, they only get confused and in the way. You will get a lot more from a good text editor (a few good ones have already been suggested) designed to know something about code. At the very least you want an editor that will give you syntax-highlighting, and most decent text/code editors will let you define the highlighting for a new language if it does not already support it. Also, some editors are actually *aware* of the language and help you write the code. Microsoft was the first that I know of to introduce the idea (IntelliSense) in their Visual Studio IDE, and it caught really quickly with many editors. I suggest you try at least three or four editors and spend some time with each. Some suggestions:

 

Eclipse (particularly strong for more modern languages like C/C++/Java, etc. but a very advanced IDE)

Textpad (my personal preference, commercial and free, and I created a TSM9900 assembly syntax highlight definition for it)

Notepad++ (great open-source editor)

UltraEdit (commercial, not free)

 

Just Google "text editor" and have a look. You will find that most editors have a focus, but at their heart they will all support basic text editing and should have features useful to writing code.

 

Link to comment
Share on other sites

An example of TMS9900 with syntax highlighting using Textpad. I like a black background, but that is completely optional. Assembly keywords are blue, numbers are orange, registers are red, comments are teal, trailing comments are green, assembler directives are brown, and labels are grey.

 

One of the nice things about syntax highlighting, even if the editor does not have language knowledge, is that if you spell something wrong, like JNW instead of JNE for example, the instruction won't turn the proper color and you can catch your bug before it bites you.

post-24952-0-62988600-1350497031_thumb.png

  • Like 1
Link to comment
Share on other sites

Looks like you are in good hands here. But yeah, when Classic99 /writes/ a text file, if you want the .TXT extension then you have to type it in the TI as well (ie: DSK1.TEXTFILE.TXT). When it /reads/ a text file, the extension is mandatory.

 

Most Word Processors do not save text files by default, they contain other information such as formatting and layout. So a notepad or Textpad as suggested is a better option.

 

Classic99 will read Windows text files without any configuration, so if you're having trouble with reading let me know and we'll walk you through it. :)

 

Link to comment
Share on other sites

An example of TMS9900 with syntax highlighting using Textpad. I like a black background, but that is completely optional. Assembly keywords are blue, numbers are orange, registers are red, comments are teal, trailing comments are green, assembler directives are brown, and labels are grey.

 

One of the nice things about syntax highlighting, even if the editor does not have language knowledge, is that if you spell something wrong, like JNW instead of JNE for example, the instruction won't turn the proper color and you can catch your bug before it bites you.

Very nice Matt. Can you share that definition?

Link to comment
Share on other sites

Thanks for all the advice! I tried this out last night and all works as it should. I wasn't adding the .TXT on the TI side, and as pointed out, the word processor was adding some junk. I will be using word pad for now 'cause I want to focus on deciphering the code I'm writing. When I'm caught up a bit I will be trying out textpad - it looks very promising.

 

Harry

Link to comment
Share on other sites

I like a black background, but that is completely optional.

 

I am with you.. It might be because I do spend some time in 5250 Terminal Emulation when working on the IBM i.

 

I do think that it is easier on the eyes.

 

I do not like word processors for even writing notes. I just figured if he was that set on a word processor, I would at least let him know that it is doable.

 

Eclipse would be overkill unless we could get the emulator to plug into it and run stuff on the fly for testing., :)

Link to comment
Share on other sites

Very nice Matt. Can you share that definition?

 

Here you go. Note I changed the definition to color the trailing comment using the // sequence. You can bind the comment coloring to a specific column, but I found that somewhat limiting when some instructions with long labels would go past the E/A default column of 31. I don't think // exists for any purpose in standard 9900 assembly, and it lets you have trailing comments at any column after the mandatory instruction columns. Some people like the semi-colon, so you can use that too if you want.

 

I use tab stops at 8, 13, 31, and 40. The first three correspond to the E/A editor settings, and for assembly I have my tabs converted to spaces by the editor.

 

You will have to define the colors yourself, but there are not too many of them (unlike Eclipse...)

tms9900.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...