{"id":30,"date":"2023-02-24T19:02:26","date_gmt":"2023-02-25T00:02:26","guid":{"rendered":"https:\/\/fortycreek.org\/?p=30"},"modified":"2023-02-24T19:02:57","modified_gmt":"2023-02-25T00:02:57","slug":"cpm-z80-output","status":"publish","type":"post","link":"https:\/\/fortycreek.org\/index.php\/2023\/02\/24\/cpm-z80-output\/","title":{"rendered":"cpm z80 output"},"content":{"rendered":"\n<p>Up until now I was using raw serial output for console, but I think this is not the correct way.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>write_char:\n        in a,(3)\n        and 001h\n        jp z, write_char\n        ld a,b\n        out (2),a\n        ret\n<\/code><\/pre>\n\n\n\n<p>now this works, but it does not work for cpm emulator yaze-ag.  I suspect this is because I should be using the syscall to output to the console.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>write_char:             push de ; preserve register values\n                        push bc\n                        ld c,2  ; function 2\n                        ld e,a  ; char to write\n                        call 5  ; call bios \/ syscall\n                        pop bc  ; restore register values\n                        pop de\n                        ret\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Up until now I was using raw serial output for console, but I think this is not the correct way. now this works, but it does not work for cpm emulator yaze-ag. I suspect this is because I should be using the syscall to output to the console.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-z80"],"_links":{"self":[{"href":"https:\/\/fortycreek.org\/index.php\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fortycreek.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fortycreek.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fortycreek.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fortycreek.org\/index.php\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":1,"href":"https:\/\/fortycreek.org\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/fortycreek.org\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions\/31"}],"wp:attachment":[{"href":"https:\/\/fortycreek.org\/index.php\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fortycreek.org\/index.php\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fortycreek.org\/index.php\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}