{"id":606,"date":"2016-04-14T18:06:59","date_gmt":"2016-04-14T17:06:59","guid":{"rendered":"http:\/\/bergatrollet.se\/blog\/?p=606"},"modified":"2016-04-16T15:54:19","modified_gmt":"2016-04-16T14:54:19","slug":"professional-pds-docs","status":"publish","type":"post","link":"http:\/\/bergatrollet.se\/blog\/2016\/04\/professional-pds-docs\/","title":{"rendered":"Professional PDS docs"},"content":{"rendered":"<figure style=\"width: 384px\" class=\"wp-caption alignright\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/i0.wp.com\/csdb.dk\/gfx\/releases\/139000\/139651.gif?resize=384%2C288\" alt=\"\" width=\"384\" height=\"288\" \/><figcaption class=\"wp-caption-text\">Running Professional PDS<\/figcaption><\/figure>\n<p>Running into the issue of having source code in a binary format and having no clue of how the editor worked, made me look high and low on the web, with no luck. In the end Uwe and Jan helped out &#8211; thanks guys. Uwe pointed out the basic fact that CTRL in VICE emulator is mapped to the tab key. Having used VICE for years, this was still news. Jan added sections of the below on the pseudo opcodes and such. Brix\/Plush added quite a bit more to the knowing. Thanks all for valuable contributions!<\/p>\n<p><strong>Keyboard command (CTRL + key)<\/strong><\/p>\n<p>B &#8211; Mark block (start\/end)<br \/>\nY &#8211; Export block (PETSCII)<br \/>\nT &#8211; Delete row (from cursor and back)<br \/>\nW &#8211; Delete char<br \/>\nI &#8211; Mark the row (makes is a comment) &#8211; use twice to toggle<br \/>\nP &#8211; Save block<br \/>\nS &#8211; Gotot Start<br \/>\nD &#8211; Delete row<br \/>\nF &#8211; Find<br \/>\nG &#8211; Get a block<br \/>\nK &#8211; Copy a block to the cursor position<br \/>\nL &#8211; Kill block<br \/>\nX &#8211; Search and replace<br \/>\nC &#8211; Goes to menu<br \/>\nN &#8211; Insert row<br \/>\nM &#8211; Cursor down<\/p>\n<p><strong>Other keyboard stuff<\/strong><\/p>\n<p>Shift &#8211; RETURN &#8211; Inser row<\/p>\n<p>RUN\/STOP Exit to menu<br \/>\nHOME Go to top<\/p>\n<p>Shift+HOME Go to bottom<br \/>\nF1\/F3 Continous scroll up\/down. Press key again to halt.<br \/>\nF5\/F7 Jump 5 characters left\/right<br \/>\nF2\/F4 Jump 24 lines up\/down<br \/>\nF6\/F8 Jump 5 lines up\/down<\/p>\n<p>One key (I think it&#8217;s page down) freezes the program, which could be because of the Action Replay<\/p>\n<p><strong>Source directives<\/strong><\/p>\n<p>.SETPC $<br \/>\n.PROGRAM &#8220;&#8221;<br \/>\n.B or .BYTE<br \/>\n.WORD<\/p>\n<p>.TEXT &#8220;&#8221; &#8211;\u00a0Petscii text<br \/>\n.STEXT &#8220;&#8221; &#8211; Screen codes<\/p>\n<p>.BEGIN<br \/>\n.END<\/p>\n<p>+<label> Global label<br \/>\n&#8211;<label> Local label (Can only be referenced within .BEGIN and .END directives)<\/label><\/label><\/p>\n<p>* CURRENT MEMORY LOCATION<\/p>\n<p>&lt;-COMPILERLABEL (arrow left): A compiler label (used as jump target for assembler directives and macro names).<br \/>\n.GOTO COMPILERLABEL -&gt; make assembler jump to compiler label. note that macro definitions must be jumped over like this:<\/p>\n<p>.GOTO COMPLABEL<br \/>\n;define your macros here<br \/>\n&lt;-COMPLABEL<\/p>\n<p>Macro-definitions:<br \/>\n&lt;-INC16 .MACRO +ADDRESS<br \/>\n.BEGIN<br \/>\nINC ADDRESS<br \/>\nBNE SKIP<br \/>\nINC ADDRESS+1<br \/>\n-SKIP .END<br \/>\n.ENDMACRO<\/p>\n<p>Macros can have more than one parameter:<br \/>\n&lt;-MOVA .MACRO +ADDRESS, +VAL<br \/>\nLDA <a class=\"_58cn\" dir=\"ltr\" href=\"https:\/\/www.facebook.com\/hashtag\/val?hc_location=ufi\" target=\"_blank\"><span class=\"_58cl\">#<\/span><span class=\"_58cm\">VAL<\/span><\/a><br \/>\nSTA ADDRESS<br \/>\n.ENDMACRO<br \/>\nusing above macro:<br \/>\nMOVA $D020,$04<\/p>\n<p>Template definitions:<br \/>\n$BNELONG = &#8220;BEQ *+5:JMP&#8221;<br \/>\nusing above template:<br \/>\nLDA #$10<br \/>\n[BNELONG] OUT<br \/>\n&#8230;<br \/>\n+OUT RTS ;some branch target out of range<\/p>\n<p>Output data while assembly:<br \/>\n.PRINT STR$(*) ;print current address, decimal)<br \/>\n.PRINT STR$(label) ;print label value<\/p>\n<p>if\/then\/else blocks:<br \/>\n.IF condition<br \/>\nblock<br \/>\n.ELSE<br \/>\nblock<br \/>\n.ENDIF<\/p>\n<p>Examples for compiler loops\/conditional assembly using above commands:<\/p>\n<p>+VALX = 10<br \/>\n.IF VALX &lt;&gt;10<br \/>\n.GOTO YELLOW<br \/>\n.ELSE<br \/>\n.GOTO PURPLE<br \/>\n.ENDIF<br \/>\n&lt;-YELLOW<br \/>\nLDA#$07<br \/>\n.GOTO SETCOLOR<br \/>\n&lt;-PURPLE<br \/>\nLDA#$04<br \/>\n&lt;-SETCOLOR STA $D021<\/p>\n<p>looping assembly (table\/speedcode generation):<br \/>\nLDA #$00<br \/>\n+DX=0:+DY=0<br \/>\n&lt;-LOOP<br \/>\nSTA $0400+(DX*40)+DY ; brackets not needed, showing anyway<br \/>\n.PRINT &#8220;X=&#8221;+STR$(DX)+&#8221;, Y=&#8221;+STR$(DY)<br \/>\n+DX=DX+1:+DY=DY+1<br \/>\n.IF DX&lt;5<br \/>\n.GOTO LOOP<br \/>\n.ENDIF<\/p>\n<p>Finally: After reset, restart assembler with:<br \/>\nSYS 53000 ($CF00)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running into the issue of having source code in a binary format and having no clue of how the editor worked, made me look high and low on the web, with no luck. In the end Uwe and Jan helped &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"http:\/\/bergatrollet.se\/blog\/2016\/04\/professional-pds-docs\/\"> <span class=\"screen-reader-text\">Professional PDS docs<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[88,89],"tags":[],"class_list":["post-606","post","type-post","status-publish","format-standard","hentry","category-88","category-commodore64"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pkM6p-9M","jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/posts\/606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/comments?post=606"}],"version-history":[{"count":6,"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/posts\/606\/revisions"}],"predecessor-version":[{"id":612,"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/posts\/606\/revisions\/612"}],"wp:attachment":[{"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/media?parent=606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/categories?post=606"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/tags?post=606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}