{"id":10,"date":"2022-11-01T00:10:45","date_gmt":"2022-11-01T00:10:45","guid":{"rendered":"https:\/\/csguy.org\/technotes\/?p=10"},"modified":"2025-05-10T18:46:39","modified_gmt":"2025-05-10T18:46:39","slug":"blinkin-lites","status":"publish","type":"post","link":"https:\/\/csguy.org\/technotes\/blinkin-lites\/","title":{"rendered":"IMSAI 8080 Blinkin Lites"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1 DIM L(8),D(8),A(10),C(10)<br>2 DATA -50,50,200,10,50,150,1,200,1,150,150,20,70,20,-50,150,-50,150,-20,150<br>3 FOR I = 1 TO 10: READ A(I),C(I): NEXT<br>4 FOR I = 0 TO 7: L(I)=1: D(I)=20*RND: NEXT<br>5 LSB=0: MSB=0: POLD=0: PNEW=0: GOTO 40<br>7 REM display LEDs &amp; wait in busy loop using switch input<br>8 REM<br>9 OUT 255,Z: IF INP(255)=0 THEN 11: REM test for zero wait<br>10 FOR X=1 TO INP(255)+100+A(P): NEXT: REM adjusted busy wait<br>11 K=K-1: RETURN<br>20 REM main loop. select pattern &amp; repeat count<br>30 REM<br>40 P=INT((RND<em>10)+1) 45 K=INT(RND<\/em>C(P)+10)<br>50 WHILE K>0:ON P GOSUB 100,200,300,400,500,600,700,800,900,1000:WEND<br>60 GOTO 40<br>100 REM scan left and right<br>101 REM<br>110 FOR I=0 TO 7: Z=255-(2^I): GOSUB 9: NEXT<br>120 FOR I=7 TO 0 STEP -1: Z=255-(2^I): GOSUB 9: NEXT<br>130 RETURN<br>200 Z=170: GOSUB 9: Z=85: GOSUB 9: RETURN :REM emergency<br>300 Z=INT(RND*254): GOSUB 9: RETURN: REM random number<br>400 Z=255-(2^INT(8*RND)): GOSUB 9: RETURN: REM random bit<br>500 REM two random bits at a time<br>510 REM<br>520 Z=255-((2^INT(8<em>RND))+(2^INT(8<\/em>RND))): IF Z&lt;0 THEN 520<br>530 GOSUB 9: RETURN<br>600 Z=240: GOSUB 9: Z=15: GOSUB 9: RETURN: REM L\/R nibble<br>700 FOR I=0 TO 3: Z=255-((2^I)+(2^(7-I))): GOSUB 9: NEXT: RETURN<br>800 REM random bits on\/off for random on\/off durations<br>801 REM<br>810 Z=0<br>820 FOR I=0 TO 7: D(I)=D(I)-1<br>830 IF (D(I)>0) AND (L(I)=1) THEN Z=Z+2^I<br>840 NEXT<br>850 GOSUB 9<br>860 FOR I=0 TO 7: IF D(I)&lt;0 THEN D(I)=20<em>RND: L(I)=-1<\/em>L(I)<br>870 NEXT<br>880 RETURN<br>900 REM looks like a VU meter<br>901 REM<br>910 MSB=INT(RND*9): IF MSBMSB THEN 930<br>940 FOR I=MSB TO LSB STEP -1: Z=256-(2^I): GOSUB 9: NEXT<br>950 RETURN<br>1000 REM simpler more realistic VU meter<br>1010 REM<br>1020 POLD=PNEW: PNEW=INT(RND*9)<br>1030 IF POLD>PNEW THEN FOR I=PNEW TO POLD: Z=256-(2^I): GOSUB 9: NEXT<br>1040 IF PNEW&lt;POLD THEN FOR I=POLD TO PNEW STEP -1: Z=256-(2^I): GOSUB 9: NEXT<br>1050 RETURN<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1 DIM L(8),D(8),A(10),C(10)2 DATA -50,50,200,10,50,150,1,200,1,150,150,20,70,20,-50,150,-50,150,-20,1503 FOR I = 1 TO 10: READ A(I),C(I): NEXT4 FOR I = 0 TO 7: L(I)=1: D(I)=20*RND: NEXT5 LSB=0: MSB=0: POLD=0: PNEW=0: GOTO 407 REM display LEDs &amp; wait in busy loop using switch input8 REM9 OUT 255,Z: IF INP(255)=0 THEN 11: REM test for zero wait10 FOR X=1 TO [&hellip;]<\/p>\n","protected":false},"author":1,"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-10","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>IMSAI 8080 Blinkin Lites - 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\/blinkin-lites\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"IMSAI 8080 Blinkin Lites - Tech Notes\" \/>\n<meta property=\"og:description\" content=\"1 DIM L(8),D(8),A(10),C(10)2 DATA -50,50,200,10,50,150,1,200,1,150,150,20,70,20,-50,150,-50,150,-20,1503 FOR I = 1 TO 10: READ A(I),C(I): NEXT4 FOR I = 0 TO 7: L(I)=1: D(I)=20*RND: NEXT5 LSB=0: MSB=0: POLD=0: PNEW=0: GOTO 407 REM display LEDs &amp; wait in busy loop using switch input8 REM9 OUT 255,Z: IF INP(255)=0 THEN 11: REM test for zero wait10 FOR X=1 TO [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/csguy.org\/technotes\/blinkin-lites\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech Notes\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-01T00:10:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-10T18:46:39+00:00\" \/>\n<meta name=\"author\" content=\"csguy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"csguy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/blinkin-lites\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/blinkin-lites\\\/\"},\"author\":{\"name\":\"csguy\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#\\\/schema\\\/person\\\/321bdd2f0766cc8e5378741b444e97ae\"},\"headline\":\"IMSAI 8080 Blinkin Lites\",\"datePublished\":\"2022-11-01T00:10:45+00:00\",\"dateModified\":\"2025-05-10T18:46:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/blinkin-lites\\\/\"},\"wordCount\":303,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/csguy.org\\\/technotes\\\/blinkin-lites\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/blinkin-lites\\\/\",\"url\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/blinkin-lites\\\/\",\"name\":\"IMSAI 8080 Blinkin Lites - Tech Notes\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#website\"},\"datePublished\":\"2022-11-01T00:10:45+00:00\",\"dateModified\":\"2025-05-10T18:46:39+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#\\\/schema\\\/person\\\/321bdd2f0766cc8e5378741b444e97ae\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/blinkin-lites\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/csguy.org\\\/technotes\\\/blinkin-lites\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/blinkin-lites\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IMSAI 8080 Blinkin Lites\"}]},{\"@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\\\/321bdd2f0766cc8e5378741b444e97ae\",\"name\":\"csguy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc439a5e118177287013f9a5a843ee28eeec4e2d23f0bc92a3187a4fc32354b9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc439a5e118177287013f9a5a843ee28eeec4e2d23f0bc92a3187a4fc32354b9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc439a5e118177287013f9a5a843ee28eeec4e2d23f0bc92a3187a4fc32354b9?s=96&d=mm&r=g\",\"caption\":\"csguy\"},\"url\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/author\\\/csguy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"IMSAI 8080 Blinkin Lites - 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\/blinkin-lites\/","og_locale":"en_US","og_type":"article","og_title":"IMSAI 8080 Blinkin Lites - Tech Notes","og_description":"1 DIM L(8),D(8),A(10),C(10)2 DATA -50,50,200,10,50,150,1,200,1,150,150,20,70,20,-50,150,-50,150,-20,1503 FOR I = 1 TO 10: READ A(I),C(I): NEXT4 FOR I = 0 TO 7: L(I)=1: D(I)=20*RND: NEXT5 LSB=0: MSB=0: POLD=0: PNEW=0: GOTO 407 REM display LEDs &amp; wait in busy loop using switch input8 REM9 OUT 255,Z: IF INP(255)=0 THEN 11: REM test for zero wait10 FOR X=1 TO [&hellip;]","og_url":"https:\/\/csguy.org\/technotes\/blinkin-lites\/","og_site_name":"Tech Notes","article_published_time":"2022-11-01T00:10:45+00:00","article_modified_time":"2025-05-10T18:46:39+00:00","author":"csguy","twitter_card":"summary_large_image","twitter_misc":{"Written by":"csguy","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/csguy.org\/technotes\/blinkin-lites\/#article","isPartOf":{"@id":"https:\/\/csguy.org\/technotes\/blinkin-lites\/"},"author":{"name":"csguy","@id":"https:\/\/csguy.org\/technotes\/#\/schema\/person\/321bdd2f0766cc8e5378741b444e97ae"},"headline":"IMSAI 8080 Blinkin Lites","datePublished":"2022-11-01T00:10:45+00:00","dateModified":"2025-05-10T18:46:39+00:00","mainEntityOfPage":{"@id":"https:\/\/csguy.org\/technotes\/blinkin-lites\/"},"wordCount":303,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/csguy.org\/technotes\/blinkin-lites\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/csguy.org\/technotes\/blinkin-lites\/","url":"https:\/\/csguy.org\/technotes\/blinkin-lites\/","name":"IMSAI 8080 Blinkin Lites - Tech Notes","isPartOf":{"@id":"https:\/\/csguy.org\/technotes\/#website"},"datePublished":"2022-11-01T00:10:45+00:00","dateModified":"2025-05-10T18:46:39+00:00","author":{"@id":"https:\/\/csguy.org\/technotes\/#\/schema\/person\/321bdd2f0766cc8e5378741b444e97ae"},"breadcrumb":{"@id":"https:\/\/csguy.org\/technotes\/blinkin-lites\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/csguy.org\/technotes\/blinkin-lites\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/csguy.org\/technotes\/blinkin-lites\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/csguy.org\/technotes\/"},{"@type":"ListItem","position":2,"name":"IMSAI 8080 Blinkin Lites"}]},{"@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\/321bdd2f0766cc8e5378741b444e97ae","name":"csguy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dc439a5e118177287013f9a5a843ee28eeec4e2d23f0bc92a3187a4fc32354b9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dc439a5e118177287013f9a5a843ee28eeec4e2d23f0bc92a3187a4fc32354b9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dc439a5e118177287013f9a5a843ee28eeec4e2d23f0bc92a3187a4fc32354b9?s=96&d=mm&r=g","caption":"csguy"},"url":"https:\/\/csguy.org\/technotes\/author\/csguy\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/posts\/10","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":4,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"predecessor-version":[{"id":221,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/posts\/10\/revisions\/221"}],"wp:attachment":[{"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}