{"action":"created","comment":{"url":"https://api.github.com/repos/cc65/cc65/pulls/comments/26765315","id":26765315,"diff_hunk":"@@ -36,10 +41,13 @@ L1:     cmp     #$0D            ; LF?\n cputdirect:","path":"libsrc/osic1p/cputc.s","position":21,"original_position":21,"commit_id":"f5ed3342465fe38af00bfe595af7370b0619cca2","original_commit_id":"f5ed3342465fe38af00bfe595af7370b0619cca2","user":{"login":"oliverschmidt","id":2664009,"avatar_url":"https://avatars.githubusercontent.com/u/2664009?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverschmidt","html_url":"https://github.com/oliverschmidt","followers_url":"https://api.github.com/users/oliverschmidt/followers","following_url":"https://api.github.com/users/oliverschmidt/following{/other_user}","gists_url":"https://api.github.com/users/oliverschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverschmidt/subscriptions","organizations_url":"https://api.github.com/users/oliverschmidt/orgs","repos_url":"https://api.github.com/users/oliverschmidt/repos","events_url":"https://api.github.com/users/oliverschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/oliverschmidt/received_events","type":"User","site_admin":false},"body":"Just to make sure there's no misunderstanding: When we discussed the usage of 'extra' modules to support different screen sizes I presumed that you'd create modules which export `cputdirect` in a different way. If you can however come up with a reasonable way to have only one implementeation of `cputdirect` just with different parameters coming form 'extra' modules than this is in general fine with me.\r\n\r\nBut please keep in mind that cc65 C library programming is mostly about size minimizing. If having several `cputdirect` implementations for diffrent screen sizes would result in (significant) smaller code size than the current approach then I'd argue to modify it. If you don't want to repeat similiar code paths then maybe phrasing the actual code as macro (which is called with different parameters) in the different modules might be a way to go. The various Atari TGI drivers follow a similiar pattern: https://github.com/cc65/cc65/tree/master/libsrc/atari/tgi\r\n\r\nAnd finally I'd like to point out that CONIO is in general not required to support scrolling. From the API perspective the behaviour of writing beyond the lower right corner of the screen is just undefined. Programs doing it might simply crash or end up to continue writing in the upper left corner or <...>. The reason for that design decision is that the CONIO implementation is supposed to be small (and fast).\r\n\r\nI don't know of the target(s) at hand but usually cc65 targets with text i/o capabilities come with some firmware allowing for (sometimes rather slow) character output - and that firmware code usually supports scrolling. So the usual approach is to map the firmware functionality (with scrolling) to POSIX I/O on stdout (and stderr) aka file number 1 (and 2)  and implement CONIO with as-fast-as-possible direct video RAM access (without scrolling).\r\n\r\nIn case you want to argue that the POSIX I/O approach doesn't apply to the target(s) at hand because of the missing mass storage support you should know that it is perfectly acceptable to only support stdin, stdout and stderr and have no open() / close() at all.","created_at":"2015-03-19T15:33:45Z","updated_at":"2015-03-19T15:33:45Z","html_url":"https://github.com/cc65/cc65/pull/153#discussion_r26765315","pull_request_url":"https://api.github.com/repos/cc65/cc65/pulls/153","_links":{"self":{"href":"https://api.github.com/repos/cc65/cc65/pulls/comments/26765315"},"html":{"href":"https://github.com/cc65/cc65/pull/153#discussion_r26765315"},"pull_request":{"href":"https://api.github.com/repos/cc65/cc65/pulls/153"}}},"pull_request":{"url":"https://api.github.com/repos/cc65/cc65/pulls/153","id":31365293,"html_url":"https://github.com/cc65/cc65/pull/153","diff_url":"https://github.com/cc65/cc65/pull/153.diff","patch_url":"https://github.com/cc65/cc65/pull/153.patch","issue_url":"https://api.github.com/repos/cc65/cc65/issues/153","number":153,"state":"open","locked":false,"title":"Support for different screen layouts via configuration modules","user":{"login":"smuehlst","id":98944,"avatar_url":"https://avatars.githubusercontent.com/u/98944?v=3","gravatar_id":"","url":"https://api.github.com/users/smuehlst","html_url":"https://github.com/smuehlst","followers_url":"https://api.github.com/users/smuehlst/followers","following_url":"https://api.github.com/users/smuehlst/following{/other_user}","gists_url":"https://api.github.com/users/smuehlst/gists{/gist_id}","starred_url":"https://api.github.com/users/smuehlst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smuehlst/subscriptions","organizations_url":"https://api.github.com/users/smuehlst/orgs","repos_url":"https://api.github.com/users/smuehlst/repos","events_url":"https://api.github.com/users/smuehlst/events{/privacy}","received_events_url":"https://api.github.com/users/smuehlst/received_events","type":"User","site_admin":false},"body":"Added support for different screen layouts. All screen-related parameters were moved to the screen.s module, which contains the default parameters for the standard 24 columns by 24 lines mode.\r\n\r\nThe default layout can be overridden by specifying a module from the libsrc/osic1p/extra directory on the linker command line.\r\n\r\nThe new code was tested successfully with a real Challenger 1P (default mode 24x24) and a [Briel Superboard /// replica](http://www.brielcomputers.com/wordpress/?cat=39) in 32x32 mode.","created_at":"2015-03-17T18:43:50Z","updated_at":"2015-03-19T15:33:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4950b8c72a60ab232de0a9082d3386d7574cfb5d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cc65/cc65/pulls/153/commits","review_comments_url":"https://api.github.com/repos/cc65/cc65/pulls/153/comments","review_comment_url":"https://api.github.com/repos/cc65/cc65/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cc65/cc65/issues/153/comments","statuses_url":"https://api.github.com/repos/cc65/cc65/statuses/f5ed3342465fe38af00bfe595af7370b0619cca2","head":{"label":"smuehlst:c1p_screenlayout","ref":"c1p_screenlayout","sha":"f5ed3342465fe38af00bfe595af7370b0619cca2","user":{"login":"smuehlst","id":98944,"avatar_url":"https://avatars.githubusercontent.com/u/98944?v=3","gravatar_id":"","url":"https://api.github.com/users/smuehlst","html_url":"https://github.com/smuehlst","followers_url":"https://api.github.com/users/smuehlst/followers","following_url":"https://api.github.com/users/smuehlst/following{/other_user}","gists_url":"https://api.github.com/users/smuehlst/gists{/gist_id}","starred_url":"https://api.github.com/users/smuehlst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smuehlst/subscriptions","organizations_url":"https://api.github.com/users/smuehlst/orgs","repos_url":"https://api.github.com/users/smuehlst/repos","events_url":"https://api.github.com/users/smuehlst/events{/privacy}","received_events_url":"https://api.github.com/users/smuehlst/received_events","type":"User","site_admin":false},"repo":{"id":10888861,"name":"cc65","full_name":"smuehlst/cc65","owner":{"login":"smuehlst","id":98944,"avatar_url":"https://avatars.githubusercontent.com/u/98944?v=3","gravatar_id":"","url":"https://api.github.com/users/smuehlst","html_url":"https://github.com/smuehlst","followers_url":"https://api.github.com/users/smuehlst/followers","following_url":"https://api.github.com/users/smuehlst/following{/other_user}","gists_url":"https://api.github.com/users/smuehlst/gists{/gist_id}","starred_url":"https://api.github.com/users/smuehlst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smuehlst/subscriptions","organizations_url":"https://api.github.com/users/smuehlst/orgs","repos_url":"https://api.github.com/users/smuehlst/repos","events_url":"https://api.github.com/users/smuehlst/events{/privacy}","received_events_url":"https://api.github.com/users/smuehlst/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smuehlst/cc65","description":"cc65 — Ohio Scientific Challenger 1P target","fork":true,"url":"https://api.github.com/repos/smuehlst/cc65","forks_url":"https://api.github.com/repos/smuehlst/cc65/forks","keys_url":"https://api.github.com/repos/smuehlst/cc65/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smuehlst/cc65/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smuehlst/cc65/teams","hooks_url":"https://api.github.com/repos/smuehlst/cc65/hooks","issue_events_url":"https://api.github.com/repos/smuehlst/cc65/issues/events{/number}","events_url":"https://api.github.com/repos/smuehlst/cc65/events","assignees_url":"https://api.github.com/repos/smuehlst/cc65/assignees{/user}","branches_url":"https://api.github.com/repos/smuehlst/cc65/branches{/branch}","tags_url":"https://api.github.com/repos/smuehlst/cc65/tags","blobs_url":"https://api.github.com/repos/smuehlst/cc65/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smuehlst/cc65/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smuehlst/cc65/git/refs{/sha}","trees_url":"https://api.github.com/repos/smuehlst/cc65/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smuehlst/cc65/statuses/{sha}","languages_url":"https://api.github.com/repos/smuehlst/cc65/languages","stargazers_url":"https://api.github.com/repos/smuehlst/cc65/stargazers","contributors_url":"https://api.github.com/repos/smuehlst/cc65/contributors","subscribers_url":"https://api.github.com/repos/smuehlst/cc65/subscribers","subscription_url":"https://api.github.com/repos/smuehlst/cc65/subscription","commits_url":"https://api.github.com/repos/smuehlst/cc65/commits{/sha}","git_commits_url":"https://api.github.com/repos/smuehlst/cc65/git/commits{/sha}","comments_url":"https://api.github.com/repos/smuehlst/cc65/comments{/number}","issue_comment_url":"https://api.github.com/repos/smuehlst/cc65/issues/comments{/number}","contents_url":"https://api.github.com/repos/smuehlst/cc65/contents/{+path}","compare_url":"https://api.github.com/repos/smuehlst/cc65/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smuehlst/cc65/merges","archive_url":"https://api.github.com/repos/smuehlst/cc65/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smuehlst/cc65/downloads","issues_url":"https://api.github.com/repos/smuehlst/cc65/issues{/number}","pulls_url":"https://api.github.com/repos/smuehlst/cc65/pulls{/number}","milestones_url":"https://api.github.com/repos/smuehlst/cc65/milestones{/number}","notifications_url":"https://api.github.com/repos/smuehlst/cc65/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smuehlst/cc65/labels{/name}","releases_url":"https://api.github.com/repos/smuehlst/cc65/releases{/id}","created_at":"2013-06-23T17:33:37Z","updated_at":"2015-03-17T19:05:23Z","pushed_at":"2015-03-17T18:32:12Z","git_url":"git://github.com/smuehlst/cc65.git","ssh_url":"git@github.com:smuehlst/cc65.git","clone_url":"https://github.com/smuehlst/cc65.git","svn_url":"https://github.com/smuehlst/cc65","homepage":"http://oliverschmidt.github.io/cc65/","size":38859,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"c1p"}},"base":{"label":"cc65:master","ref":"master","sha":"166a29953518ca698820f468cbc7f939c2129c7a","user":{"login":"cc65","id":6959645,"avatar_url":"https://avatars.githubusercontent.com/u/6959645?v=3","gravatar_id":"","url":"https://api.github.com/users/cc65","html_url":"https://github.com/cc65","followers_url":"https://api.github.com/users/cc65/followers","following_url":"https://api.github.com/users/cc65/following{/other_user}","gists_url":"https://api.github.com/users/cc65/gists{/gist_id}","starred_url":"https://api.github.com/users/cc65/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cc65/subscriptions","organizations_url":"https://api.github.com/users/cc65/orgs","repos_url":"https://api.github.com/users/cc65/repos","events_url":"https://api.github.com/users/cc65/events{/privacy}","received_events_url":"https://api.github.com/users/cc65/received_events","type":"Organization","site_admin":false},"repo":{"id":8932489,"name":"cc65","full_name":"cc65/cc65","owner":{"login":"cc65","id":6959645,"avatar_url":"https://avatars.githubusercontent.com/u/6959645?v=3","gravatar_id":"","url":"https://api.github.com/users/cc65","html_url":"https://github.com/cc65","followers_url":"https://api.github.com/users/cc65/followers","following_url":"https://api.github.com/users/cc65/following{/other_user}","gists_url":"https://api.github.com/users/cc65/gists{/gist_id}","starred_url":"https://api.github.com/users/cc65/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cc65/subscriptions","organizations_url":"https://api.github.com/users/cc65/orgs","repos_url":"https://api.github.com/users/cc65/repos","events_url":"https://api.github.com/users/cc65/events{/privacy}","received_events_url":"https://api.github.com/users/cc65/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cc65/cc65","description":"cc65 - a freeware C compiler for 6502 based systems -","fork":false,"url":"https://api.github.com/repos/cc65/cc65","forks_url":"https://api.github.com/repos/cc65/cc65/forks","keys_url":"https://api.github.com/repos/cc65/cc65/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cc65/cc65/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cc65/cc65/teams","hooks_url":"https://api.github.com/repos/cc65/cc65/hooks","issue_events_url":"https://api.github.com/repos/cc65/cc65/issues/events{/number}","events_url":"https://api.github.com/repos/cc65/cc65/events","assignees_url":"https://api.github.com/repos/cc65/cc65/assignees{/user}","branches_url":"https://api.github.com/repos/cc65/cc65/branches{/branch}","tags_url":"https://api.github.com/repos/cc65/cc65/tags","blobs_url":"https://api.github.com/repos/cc65/cc65/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cc65/cc65/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cc65/cc65/git/refs{/sha}","trees_url":"https://api.github.com/repos/cc65/cc65/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cc65/cc65/statuses/{sha}","languages_url":"https://api.github.com/repos/cc65/cc65/languages","stargazers_url":"https://api.github.com/repos/cc65/cc65/stargazers","contributors_url":"https://api.github.com/repos/cc65/cc65/contributors","subscribers_url":"https://api.github.com/repos/cc65/cc65/subscribers","subscription_url":"https://api.github.com/repos/cc65/cc65/subscription","commits_url":"https://api.github.com/repos/cc65/cc65/commits{/sha}","git_commits_url":"https://api.github.com/repos/cc65/cc65/git/commits{/sha}","comments_url":"https://api.github.com/repos/cc65/cc65/comments{/number}","issue_comment_url":"https://api.github.com/repos/cc65/cc65/issues/comments{/number}","contents_url":"https://api.github.com/repos/cc65/cc65/contents/{+path}","compare_url":"https://api.github.com/repos/cc65/cc65/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cc65/cc65/merges","archive_url":"https://api.github.com/repos/cc65/cc65/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cc65/cc65/downloads","issues_url":"https://api.github.com/repos/cc65/cc65/issues{/number}","pulls_url":"https://api.github.com/repos/cc65/cc65/pulls{/number}","milestones_url":"https://api.github.com/repos/cc65/cc65/milestones{/number}","notifications_url":"https://api.github.com/repos/cc65/cc65/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cc65/cc65/labels{/name}","releases_url":"https://api.github.com/repos/cc65/cc65/releases{/id}","created_at":"2013-03-21T15:56:48Z","updated_at":"2015-03-18T17:55:41Z","pushed_at":"2015-03-15T10:40:34Z","git_url":"git://github.com/cc65/cc65.git","ssh_url":"git@github.com:cc65/cc65.git","clone_url":"https://github.com/cc65/cc65.git","svn_url":"https://github.com/cc65/cc65","homepage":"http://cc65.github.io/cc65","size":399208,"stargazers_count":122,"watchers_count":122,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":44,"mirror_url":null,"open_issues_count":2,"forks":44,"open_issues":2,"watchers":122,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cc65/cc65/pulls/153"},"html":{"href":"https://github.com/cc65/cc65/pull/153"},"issue":{"href":"https://api.github.com/repos/cc65/cc65/issues/153"},"comments":{"href":"https://api.github.com/repos/cc65/cc65/issues/153/comments"},"review_comments":{"href":"https://api.github.com/repos/cc65/cc65/pulls/153/comments"},"review_comment":{"href":"https://api.github.com/repos/cc65/cc65/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cc65/cc65/pulls/153/commits"},"statuses":{"href":"https://api.github.com/repos/cc65/cc65/statuses/f5ed3342465fe38af00bfe595af7370b0619cca2"}}}}