{"action":"created","issue":{"url":"https://api.github.com/repos/open-watcom/open-watcom-v2/issues/243","repository_url":"https://api.github.com/repos/open-watcom/open-watcom-v2","labels_url":"https://api.github.com/repos/open-watcom/open-watcom-v2/issues/243/labels{/name}","comments_url":"https://api.github.com/repos/open-watcom/open-watcom-v2/issues/243/comments","events_url":"https://api.github.com/repos/open-watcom/open-watcom-v2/issues/243/events","html_url":"https://github.com/open-watcom/open-watcom-v2/issues/243","id":148881306,"number":243,"title":"Unnecessary DS loaded in an interrupt handler's prolog","user":{"login":"guy-david","id":2877615,"avatar_url":"https://avatars.githubusercontent.com/u/2877615?v=3","gravatar_id":"","url":"https://api.github.com/users/guy-david","html_url":"https://github.com/guy-david","followers_url":"https://api.github.com/users/guy-david/followers","following_url":"https://api.github.com/users/guy-david/following{/other_user}","gists_url":"https://api.github.com/users/guy-david/gists{/gist_id}","starred_url":"https://api.github.com/users/guy-david/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guy-david/subscriptions","organizations_url":"https://api.github.com/users/guy-david/orgs","repos_url":"https://api.github.com/users/guy-david/repos","events_url":"https://api.github.com/users/guy-david/events{/privacy}","received_events_url":"https://api.github.com/users/guy-david/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-16T19:16:37Z","updated_at":"2016-04-17T12:46:16Z","closed_at":null,"body":"Hello,\r\n\r\nI am trying to compile a 16-bit interrupt handler in C and the output format is raw binary. The code generator decides to load DS in the prolog of the interrupt handler, which creates a relocation to `seg CONST`. The interrupt no longer loads DS when compiling with `-ml`, however that creates many other relocations through-out the entire code (does not seem that the large memory model fits to my needs)..\r\n\r\nI have tracked [these lines of code](https://github.com/open-watcom/open-watcom-v2/blob/master/bld/cg/intel/c/i86proc.c#L851) which decide whether or not to load DS in the interrupt's prolog. How can I direct wcc to not load the DS register, and still compile with `-ms`?"},"comment":{"url":"https://api.github.com/repos/open-watcom/open-watcom-v2/issues/comments/211013150","html_url":"https://github.com/open-watcom/open-watcom-v2/issues/243#issuecomment-211013150","issue_url":"https://api.github.com/repos/open-watcom/open-watcom-v2/issues/243","id":211013150,"user":{"login":"jmalak","id":2017260,"avatar_url":"https://avatars.githubusercontent.com/u/2017260?v=3","gravatar_id":"","url":"https://api.github.com/users/jmalak","html_url":"https://github.com/jmalak","followers_url":"https://api.github.com/users/jmalak/followers","following_url":"https://api.github.com/users/jmalak/following{/other_user}","gists_url":"https://api.github.com/users/jmalak/gists{/gist_id}","starred_url":"https://api.github.com/users/jmalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmalak/subscriptions","organizations_url":"https://api.github.com/users/jmalak/orgs","repos_url":"https://api.github.com/users/jmalak/repos","events_url":"https://api.github.com/users/jmalak/events{/privacy}","received_events_url":"https://api.github.com/users/jmalak/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T12:46:16Z","updated_at":"2016-04-17T12:46:16Z","body":"Sorry, but you mix linker problem with code generator.\r\nWhat has raw binary format with code generator generated code?\r\nI don't know any C compiler for segmented architecture which is able to satisfy your requirements.\r\nHow you want initialize ds register, how you get value for it?\r\nIt is unclear what purpose is for your interrupt handler code which is always far code out of C run-time context. Is it for embeded programing?\r\nIf yes then question is about linking and you should read OW linker documentation about ORDER command to do segments assignment to fix address and therefore no problem with any relocation."}}