

If you need to escape the escape, hex-escape it, e.g. The extension evaluates only hex escapes. For example, REM first line\x0anext line uses \x0a to represent a line feed in the comment. Hex escapes are used to allow such files to be parsed as normal line entry. Some Applesoft programs, especially those written in the early days, have CR, LF, or other control characters embedded in strings, comments, or data. A convenient way to do this is to select the snippet with the special annotation, and then immediately press space. Completions for special addresses are triggered when the space key is pressed following CALL, PEEK, or POKE. Hovering over a literal address argument of CALL, PEEK, or POKE will display information about any address in the database. The extension knows hundreds of special address locations relevant to Applesoft, DOS 3.3, ProDOS, and the Apple ][ ROM. Note the ending addresses in the two cases. If you want to see how much space you have saved, you can use the show tokenized program command on the transformed and untransformed code. This has to be done separately using the renumber lines command. Make sure you review and repair all variable name collisions before applying this transformation.Īs of this writing, minify does not include renumbering lines. This produces a new document, leaving the existing one unchanged.
#2 SIDED DISK APPLEWIN CODE#
You must include any desired suffix ( $ or %) in the replacement text, even though VS Code may offer a default without this. You can use rename symbol to quickly change the names of variables or functions.

The assumption here is that colliding variable names are bugs or potential bugs. In every other respect, the extension will treat colliding variable names as distinct, e.g., using goto references on CUTE will not find references to CUBE. By default, the extension will underline colliding variable names with a warning squiggle.

Managing VariablesĪpplesoft variables and function names have the property that only the first two characters are significant, e.g., CUTE and CUBE are the same variable. Instead, use the renumber lines command if you want to renumber. On the other hand, rename symbol cannot be used with line numbers. The text of any comment on or before the line will be used in the document outline and in line reference hovers. For example, if GOSUB 100 is found in the document, right-clicking on any reference to line 100 allows you to apply symbol manipulations such as goto references and goto definition. You can treat these line numbers just as if they were, say, function names in a modern language. The extension will treat line numbers as document symbols if they are branch destinations. Options : see Ctrl+Comma -> Extensions -> Applesoft BASIC.View tokenized program as hex dump and unicode text.Transfer programs to and from emulators and disk images (see below).Diagnostics to identify errors and gotchas.Management of variables, functions, and line numbers.Semantic highlights true to Apple //e ROM parsing.Latest update: smarter completions, better ampersand handling Language support for Applesoft BASIC in Visual Studio Code.
