Getting Started with z/TPF Extension
This guide will help you get up and running with the z/TPF VS Code Extension.
Table of Contents
- Getting Started with z/TPF Extension
Quick Start
Step 1: Install the Extension
If you haven’t already, install the extension from the VS Code Marketplace. See the Installation Guide for detailed instructions.
Step 2: Connect to Your z/TPF System
- Open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Type “z/TPF: Connect to System”
- Enter your z/TPF system details:
- Hostname or IP address
- Port number
- Username
- Password (stored securely)
Step 3: Open a z/TPF Workspace
- Use File > Open Folder to open your local workspace
- Or connect to a remote z/TPF directory:
- Command Palette > “z/TPF: Open Remote Folder”
- Navigate to your z/TPF project directory
Your First z/TPF Project
Creating a New File
- In the Explorer view, right-click and select New File
- Name your file with a z/TPF extension (e.g.,
program.asm) - The extension will automatically activate syntax highlighting
Writing z/TPF Code
Start typing z/TPF assembly code. The extension provides:
* Sample z/TPF Assembly Program
PROGRAM CSECT
USING *,R15
L R1,=A(MESSAGE)
WTO MF=(E,(1))
BR R14
MESSAGE DC C'Hello from z/TPF!'
END PROGRAM
Features you’ll notice:
- Syntax highlighting for instructions and registers
- IntelliSense suggestions as you type
- Automatic indentation
- Error detection
Basic Workflow
1. Edit Your Code
Use VS Code’s powerful editing features:
- Code Completion: Press
Ctrl+Spacefor suggestions - Go to Definition:
F12on any symbol - Find References:
Shift+F12to find all usages - Format Document:
Shift+Alt+Fto auto-format
2. Build Your Program
To compile your z/TPF program:
- Open the Command Palette (
Ctrl+Shift+P) - Run “z/TPF: Build Current File”
- View build output in the Terminal panel
- Check for errors in the Problems panel
3. Debug Your Code
Set up debugging:
- Click in the gutter to set breakpoints
- Press
F5to start debugging - Use the Debug toolbar to:
- Continue (
F5) - Step Over (
F10) - Step Into (
F11) - Step Out (
Shift+F11)
- Continue (
4. Deploy to z/TPF
Deploy your compiled program:
- Command Palette > “z/TPF: Deploy to System”
- Select the target environment
- Confirm deployment
- Monitor the output for success
Essential Commands
Access these commands via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
| Command | Description |
|---|---|
z/TPF: Connect to System | Establish connection to z/TPF |
z/TPF: Disconnect | Close z/TPF connection |
z/TPF: Build Current File | Compile the active file |
z/TPF: Build All | Compile all files in workspace |
z/TPF: Deploy to System | Deploy compiled programs |
z/TPF: View System Logs | Open z/TPF system logs |
z/TPF: Refresh File List | Refresh remote file explorer |
Keyboard Shortcuts
Default keyboard shortcuts:
| Shortcut | Action |
|---|---|
Ctrl+Shift+B | Build current file |
F5 | Start debugging |
F9 | Toggle breakpoint |
F12 | Go to definition |
Shift+F12 | Find all references |
Ctrl+K Ctrl+D | Format document |
Customize shortcuts in File > Preferences > Keyboard Shortcuts.
Working with Remote Files
Browse Remote Files
- Open the z/TPF Explorer in the Activity Bar
- Navigate through your remote directories
- Click files to open them in the editor
- Changes are automatically synced
Upload/Download Files
Upload local file:
Right-click file > z/TPF: Upload to System
Download remote file:
Right-click in z/TPF Explorer > Download to Local
Tips for Productivity
Use Snippets
Type these prefixes and press Tab:
tpf-prog- Create a basic program structuretpf-macro- Insert a macro definitiontpf-sub- Create a subroutine template
Customize Settings
Tailor the extension to your workflow:
- Open Settings (
Ctrl+,) - Search for “z/TPF”
- Adjust preferences like:
- Auto-save behavior
- Build options
- Syntax highlighting themes
Use the Integrated Terminal
Access z/TPF commands directly:
- Open Terminal (
Ctrl+`) - Run z/TPF CLI commands
- View real-time output
Common Tasks
Task 1: Create and Build a Program
1. Create new file: program.asm
2. Write your z/TPF code
3. Save the file (Ctrl+S)
4. Build: Ctrl+Shift+B
5. Check Problems panel for errors
Task 2: Debug a Program
1. Set breakpoints (click gutter or F9)
2. Start debugging (F5)
3. Inspect variables in Debug panel
4. Step through code (F10/F11)
5. View call stack and locals
Task 3: Deploy to Production
1. Build all files successfully
2. Run: z/TPF: Deploy to System
3. Select production environment
4. Confirm deployment
5. Verify in system logs
Next Steps
Now that you’re familiar with the basics:
- Explore Features for advanced capabilities
- Review Configuration for customization options
- Check out example projects on GitHub
Getting Help
If you need assistance:
- Check the FAQ section
- Search GitHub Issues
- Join the community discussions