{"id":211,"date":"2025-05-10T18:13:00","date_gmt":"2025-05-10T18:13:00","guid":{"rendered":"https:\/\/csguy.org\/technotes\/?p=211"},"modified":"2025-05-10T19:01:36","modified_gmt":"2025-05-10T19:01:36","slug":"beautiful-menu","status":"publish","type":"post","link":"https:\/\/csguy.org\/technotes\/beautiful-menu\/","title":{"rendered":"simple &amp; beautiful menu"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Over the years I have played with various HELLO programs on the Apple II to find something curated (not automatic\/catalog driven) which is easy to manage for a wide variety of disk contents.  I have put this one together which embodies a few tricks and some assembler code to speed up the slow parts.  The Applesoft HELLO program loads HELLOBIN which does 2 things&#8230;. it reads the VTOC and calculates the free sectors on the disk making it part of the display.  There is also a small subroutine inside it that will test the keyboard strobe to see if a key has been pressed.  When using the strobe subroutine it&#8217;s important to use it in the tightest loops of any applesoft program.  I should also mention I have only tested this on machines with 48K or more of ram&#8230;. it&#8217;s one of the shortcut assumptions.   I like tight code which was also one of my goals. HELLOBIN is 2 sectors and the Applesoft uses 5 sectors.  Watch out for the hard coded LoBytes in the assembly program (look for &lt;====) if you decide to relocate it; I didn&#8217;t bother to figure out the proper directive for the LISA assembler. Lastly, the HELLO program includes a decent screen saver feature.   Without further ado here are the listings&#8230;..<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>88 HOME\n99 POKE 49233,0: POKE 32127,32\n100 DATA \"Copy A\",\"RUNCOPYA\"\n110 DATA \"Copy II+\", \"BRUNCOPY\"\n120 DATA \"Locksmith\", \"BRUNLOCKSMITH 4.1\"\n130 DATA \"Program Editor\", \"BRUNEDITOR\"\n140 DATA \"Cat Arranger\" , \"BRUNCAT ARRANGER\"\n150 DATA \"Pretty CAT\", \"RUNPRETTYCAT\"\n160 DATA \"Execumatic\", \"RUNEXECUMATIC\"\n170 DATA \"Renumber\", \"RUNRENUMBER\"\n190 DATA \"ZIP Chip\",\"RUNZIP\"\n200 DATA \"END\",\"END\" : DIM A$(30),B$(30):B = 1\n201 READ A$(B),B$(B): IF A$(B) &lt; &gt; \"END\" THEN B = B + 1: GOTO 201\n250 XX = 1000:TT = 0:D$ = CHR$ (4):L$ = CHR$ (13)\n260 PRINT CHR$ (4);\"BLOADHELLOBIN\": CALL 787\n265 D = PEEK (43624):S = PEEK (43626):F = PEEK (6) + 256 * PEEK (7)\n300 TEXT : HOME : HTAB 26: PRINT \"S:\";S;\" D:\";D;\" F:\";F\n320 FOR C = 1 TO B - 1\n330 VTAB 2 * C + 1: HTAB 10: PRINT CHR$ (C + 64)\") \";A$(C): NEXT C\n340 VTAB 23: HTAB 38:TT = 0\n350 CALL 768:K = PEEK (77):TT = TT + 1: IF TT &gt; XX THEN 900\n370 IF K = 155 THEN TEXT : HOME : END\n380 IF (K &gt; 179) AND (K &lt; 184) THEN C$ = \"PR#\" + CHR$ (K): GOTO 800\n390 IF (K = 177) OR (K = 178) THEN C$=\"CATALOGD\" + CHR$ (K): GOTO 800\n400 K = K - 192: IF (K &gt; B - 1) OR (K &lt; 1) THEN 350\n410 HOME : VTAB 12: PRINT \" Loading....\";A$(K): PRINT D$;B$(K): END\n800 TEXT : HOME : PRINT \"Exiting...\": PRINT L$D$C$L$: END\n900 GR : HOME\n920 COLOR= RND (1) * 16\n930 X1 = RND (9) * 34:X2 = X1 + 2 + RND (9) * 4\n940 Y1 = RND (9) * 34:Y2 = Y1 + 2 + RND (9) * 5\n950 FOR V = Y1 TO Y2: CALL 768: IF PEEK (77) &gt; 0 THEN 300\n951 HLIN X1,X2 AT V: NEXT V: GOTO 920<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>      ORG $300           \nKEYIN LDA $C000      \n      BIT $C000 \n      BPL NOKEY\n      STA $4D       \n      BIT $C010 \n      RTS\nNOKEY LDA #$00\n      STA $4D\n      RTS\nVTOC  LDA $AA6A          ; Load slot number\n      ASL                ; Multiply by 16\n      ASL \n      ASL \n      ASL \n      STA SLOT           ; Store in IOB\n      LDA $AA68          ; Load drive number\n      STA DRIVE          ; Store in IOB\n      LDA #$03           ; High byte of IOB\n      LDY #$5B           ; Low byte of IOB &lt;===\n      JSR $03D9          ; Call RWTS\nCOUNT LDA #$38           ; Walk the bitmap\n      STA $4C\n      LDA #$60\n      STA $4D\n      LDA #0\n      STA $4E\n      STA $4F\n      LDY #0\nLOOP1 LDA ($4C),Y\n      STA $50\n      LDX #8\nLOOP2 LSR $50\n      BCC SKIP\n      INC $4E\n      BNE SKIP\n      INC $4F\nSKIP  DEX\n      BNE LOOP2\n      INY\n      CPY #140\n      BNE LOOP1\n      LDA $4E\n      STA $06\n      LDA $4F\n      STA $07\n      RTS\nIOB   HEX 01             ; IOB type indicator\nSLOT  HEX 00             ; Slot number * 16  \nDRIVE HEX 00             ; Drive number  \n      HEX 00             ; Expected volume  \n      HEX 11             ; Track number  \n      HEX 00             ; Sector number \n      HEX 6C             ; Low byte of DCT &lt;===\n      HEX 03             ; High byte of DCT\n      HEX 00             ; Low byte of buffer  \n      HEX 60             ; High byte of buffer \n      HEX 00             ; unused\n      HEX 00             ; unused\n      HEX 01             ; Command code \n      HEX 00             ; Return error code  \n      HEX 00             ; Return volume\n      HEX 00             ; Previous slot\n      HEX 00             ; Previous drive\nDCT   HEX 00             \n      HEX 01              \n      HEX EF             \n      HEX D8             \n      END<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the years I have played with various HELLO programs on the Apple II to find something curated (not automatic\/catalog driven) which is easy to manage for a wide variety of disk contents. I have put this one together which embodies a few tricks and some assembler code to speed up the slow parts. The [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-211","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>simple &amp; beautiful menu - Tech Notes<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/csguy.org\/technotes\/beautiful-menu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"simple &amp; beautiful menu - Tech Notes\" \/>\n<meta property=\"og:description\" content=\"Over the years I have played with various HELLO programs on the Apple II to find something curated (not automatic\/catalog driven) which is easy to manage for a wide variety of disk contents. I have put this one together which embodies a few tricks and some assembler code to speed up the slow parts. The [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/csguy.org\/technotes\/beautiful-menu\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech Notes\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-10T18:13:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-10T19:01:36+00:00\" \/>\n<meta name=\"author\" content=\"barry hills\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"barry hills\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/beautiful-menu\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/beautiful-menu\\\/\"},\"author\":{\"name\":\"barry hills\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#\\\/schema\\\/person\\\/89e2d600fe21bcb92d502289e27831a4\"},\"headline\":\"simple &amp; beautiful menu\",\"datePublished\":\"2025-05-10T18:13:00+00:00\",\"dateModified\":\"2025-05-10T19:01:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/beautiful-menu\\\/\"},\"wordCount\":221,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/csguy.org\\\/technotes\\\/beautiful-menu\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/beautiful-menu\\\/\",\"url\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/beautiful-menu\\\/\",\"name\":\"simple &amp; beautiful menu - Tech Notes\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#website\"},\"datePublished\":\"2025-05-10T18:13:00+00:00\",\"dateModified\":\"2025-05-10T19:01:36+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#\\\/schema\\\/person\\\/89e2d600fe21bcb92d502289e27831a4\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/beautiful-menu\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/csguy.org\\\/technotes\\\/beautiful-menu\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/beautiful-menu\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"simple &amp; beautiful menu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#website\",\"url\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/\",\"name\":\"Tech Notes\",\"description\":\"Sharing the tech\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#\\\/schema\\\/person\\\/89e2d600fe21bcb92d502289e27831a4\",\"name\":\"barry hills\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e7df4c371d55904f1d858a9d27549d002b93713cd2f13d672c3c0898efcb70b4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e7df4c371d55904f1d858a9d27549d002b93713cd2f13d672c3c0898efcb70b4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e7df4c371d55904f1d858a9d27549d002b93713cd2f13d672c3c0898efcb70b4?s=96&d=mm&r=g\",\"caption\":\"barry hills\"},\"url\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/author\\\/barry\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"simple &amp; beautiful menu - Tech Notes","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/csguy.org\/technotes\/beautiful-menu\/","og_locale":"en_US","og_type":"article","og_title":"simple &amp; beautiful menu - Tech Notes","og_description":"Over the years I have played with various HELLO programs on the Apple II to find something curated (not automatic\/catalog driven) which is easy to manage for a wide variety of disk contents. I have put this one together which embodies a few tricks and some assembler code to speed up the slow parts. The [&hellip;]","og_url":"https:\/\/csguy.org\/technotes\/beautiful-menu\/","og_site_name":"Tech Notes","article_published_time":"2025-05-10T18:13:00+00:00","article_modified_time":"2025-05-10T19:01:36+00:00","author":"barry hills","twitter_card":"summary_large_image","twitter_misc":{"Written by":"barry hills","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/csguy.org\/technotes\/beautiful-menu\/#article","isPartOf":{"@id":"https:\/\/csguy.org\/technotes\/beautiful-menu\/"},"author":{"name":"barry hills","@id":"https:\/\/csguy.org\/technotes\/#\/schema\/person\/89e2d600fe21bcb92d502289e27831a4"},"headline":"simple &amp; beautiful menu","datePublished":"2025-05-10T18:13:00+00:00","dateModified":"2025-05-10T19:01:36+00:00","mainEntityOfPage":{"@id":"https:\/\/csguy.org\/technotes\/beautiful-menu\/"},"wordCount":221,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/csguy.org\/technotes\/beautiful-menu\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/csguy.org\/technotes\/beautiful-menu\/","url":"https:\/\/csguy.org\/technotes\/beautiful-menu\/","name":"simple &amp; beautiful menu - Tech Notes","isPartOf":{"@id":"https:\/\/csguy.org\/technotes\/#website"},"datePublished":"2025-05-10T18:13:00+00:00","dateModified":"2025-05-10T19:01:36+00:00","author":{"@id":"https:\/\/csguy.org\/technotes\/#\/schema\/person\/89e2d600fe21bcb92d502289e27831a4"},"breadcrumb":{"@id":"https:\/\/csguy.org\/technotes\/beautiful-menu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/csguy.org\/technotes\/beautiful-menu\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/csguy.org\/technotes\/beautiful-menu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/csguy.org\/technotes\/"},{"@type":"ListItem","position":2,"name":"simple &amp; beautiful menu"}]},{"@type":"WebSite","@id":"https:\/\/csguy.org\/technotes\/#website","url":"https:\/\/csguy.org\/technotes\/","name":"Tech Notes","description":"Sharing the tech","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/csguy.org\/technotes\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/csguy.org\/technotes\/#\/schema\/person\/89e2d600fe21bcb92d502289e27831a4","name":"barry hills","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e7df4c371d55904f1d858a9d27549d002b93713cd2f13d672c3c0898efcb70b4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e7df4c371d55904f1d858a9d27549d002b93713cd2f13d672c3c0898efcb70b4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e7df4c371d55904f1d858a9d27549d002b93713cd2f13d672c3c0898efcb70b4?s=96&d=mm&r=g","caption":"barry hills"},"url":"https:\/\/csguy.org\/technotes\/author\/barry\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/posts\/211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/comments?post=211"}],"version-history":[{"count":8,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/posts\/211\/revisions"}],"predecessor-version":[{"id":225,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/posts\/211\/revisions\/225"}],"wp:attachment":[{"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/media?parent=211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/categories?post=211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/tags?post=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}