{"action":"created","issue":{"url":"https://api.github.com/repos/paultech/DASM/issues/15","repository_url":"https://api.github.com/repos/paultech/DASM","labels_url":"https://api.github.com/repos/paultech/DASM/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/paultech/DASM/issues/15/comments","events_url":"https://api.github.com/repos/paultech/DASM/issues/15/events","html_url":"https://github.com/paultech/DASM/issues/15","id":131998388,"number":15,"title":".define doesn't work: \"Insufficient operands\"","user":{"login":"azertyfun","id":1971608,"avatar_url":"https://avatars.githubusercontent.com/u/1971608?v=3","gravatar_id":"","url":"https://api.github.com/users/azertyfun","html_url":"https://github.com/azertyfun","followers_url":"https://api.github.com/users/azertyfun/followers","following_url":"https://api.github.com/users/azertyfun/following{/other_user}","gists_url":"https://api.github.com/users/azertyfun/gists{/gist_id}","starred_url":"https://api.github.com/users/azertyfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azertyfun/subscriptions","organizations_url":"https://api.github.com/users/azertyfun/orgs","repos_url":"https://api.github.com/users/azertyfun/repos","events_url":"https://api.github.com/users/azertyfun/events{/privacy}","received_events_url":"https://api.github.com/users/azertyfun/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/paultech/DASM/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"alfie275","id":424865,"avatar_url":"https://avatars.githubusercontent.com/u/424865?v=3","gravatar_id":"","url":"https://api.github.com/users/alfie275","html_url":"https://github.com/alfie275","followers_url":"https://api.github.com/users/alfie275/followers","following_url":"https://api.github.com/users/alfie275/following{/other_user}","gists_url":"https://api.github.com/users/alfie275/gists{/gist_id}","starred_url":"https://api.github.com/users/alfie275/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfie275/subscriptions","organizations_url":"https://api.github.com/users/alfie275/orgs","repos_url":"https://api.github.com/users/alfie275/repos","events_url":"https://api.github.com/users/alfie275/events{/privacy}","received_events_url":"https://api.github.com/users/alfie275/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-02-07T18:57:36Z","updated_at":"2016-02-07T21:06:43Z","closed_at":null,"body":"The following code doesn't compile:\r\n\r\n```\r\n.define test A\r\n\r\nset test, 5\r\n:end set PC, end\r\n```\r\n\r\nHere is the output:\r\n\r\n```\r\n./dasm test_define.dasm test_define.bin\r\nLoading test_define.dasm\r\nError: Insufficient operands: .define test A\r\nError: Could not evaluate expression:TEST\r\n```\r\n\r\nEnvironment: Archlinux x64 4.4.0-4, Intel i7 4790K, 12 GB RAM\r\n\r\nCompiling BareBonesOS doesn't work either:\r\n```\r\n./dasm bbos/bbos.asm bbos.bin\r\nLoading bbos/bbos.asm\r\nLoading bbos.inc.asm\r\nLoading video.asm\r\nLoading drives.asm\r\nLoading keyboard.asm\r\nLoading rtc.asm\r\nLoading comms.asm\r\nError: Insufficient operands: .define VERSION 0x0100\r\nError: Insufficient operands: .define RUN_AT  0xF000\r\nError: Insufficient operands: .define LEM_ID  0x7349f615\r\nError: Insufficient operands: .define LEM_VER 0x1802\r\nError: Insufficient operands: .define LEM_MFR 0x1c6c8b36\r\nError: Insufficient operands: .define LEM_WID 32\r\nError: Insufficient operands: .define LEM_HGT 12\r\nError: Insufficient operands: .define VRAM_SIZE   384 ; LEM_WID * LEM_HGT\r\nError: Insufficient operands: .define MAX_DRIVES  8\r\nError: Insufficient operands: .define COMMS_IRQ   0x47E0\r\nError: Insufficient operands: .define HID_CLASS           3\r\nError: Insufficient operands: .define KEYBOARD_SUBCLASS   0\r\nError: Insufficient operands: .define COMMS_CLASS         0xE\r\nError: Insufficient operands: .define PARALLEL_SUBCLASS   0\r\nError: RFI opcode requires an operand\r\nError: RFI opcode requires an operand\r\nError: Could not evaluate expression:BBOSINFO_SIZE\r\nError: Could not evaluate expression:MAX_DRIVES\r\nError: Could not evaluate expression:RUN_AT\r\nError: Could not evaluate expression:VRAM_SIZE\r\nError: Could not evaluate expression:RUN_AT\r\nError: Could not evaluate expression:BBOS_IRQ_MAGIC\r\nError: Could not evaluate expression:BBOS_IRQ_MAGIC\r\nError: Could not evaluate expression:BBOS_IRQ_MAGIC\r\nError: Could not evaluate expression:BBOS_IRQ_MAGIC\r\nError: Could not evaluate expression:BBOS_IRQ_MAGIC\r\nError: Could not evaluate expression:BBOS_IRQ_MAGIC\r\nError: Could not evaluate expression:COMMS_IRQ\r\nError: Could not evaluate expression:COMMS_NOTIFY\r\nError: Could not evaluate expression:VIDEO_IRQ\r\nError: Could not evaluate expression:DRIVE_IRQ\r\nError: Could not evaluate expression:KEYBOARD_IRQ\r\nError: Could not evaluate expression:RTC_IRQ\r\nError: Could not evaluate expression:VERSION\r\nError: Could not evaluate expression:COMMS_CLASS\r\nError: Could not evaluate expression:PARALLEL_SUBCLASS\r\nError: Could not evaluate expression:HID_CLASS\r\nError: Could not evaluate expression:KEYBOARD_SUBCLASS\r\nError: Could not evaluate expression:LEM_ID\r\nError: Could not evaluate expression:LEM_ID\r\nError: Could not evaluate expression:LEM_VER\r\nError: Could not evaluate expression:LEM_MFR\r\nError: Could not evaluate expression:LEM_MFR\r\nError: Could not evaluate expression:BBOS_IRQ_MAGIC\r\nError: Could not evaluate expression:BBOS_IRQ_MAGIC\r\nError: Could not evaluate expression:MAX_DRIVES\r\nError: Could not evaluate expression:LEM_WID\r\nError: Could not evaluate expression:BBOS_VERSION\r\nError: Could not evaluate expression:VRAM_SIZE\r\nError: Could not evaluate expression:BBOS_START_ADDR\r\nError: Could not evaluate expression:BBOS_END_ADDR\r\nError: Could not evaluate expression:BBOS_INT_HANDLER\r\nError: Could not evaluate expression:BBOS_API_HANDLER\r\n```\r\nHowever, manually replacing doing the job of the preprocessor works fine."},"comment":{"url":"https://api.github.com/repos/paultech/DASM/issues/comments/181116826","html_url":"https://github.com/paultech/DASM/issues/15#issuecomment-181116826","issue_url":"https://api.github.com/repos/paultech/DASM/issues/15","id":181116826,"user":{"login":"azertyfun","id":1971608,"avatar_url":"https://avatars.githubusercontent.com/u/1971608?v=3","gravatar_id":"","url":"https://api.github.com/users/azertyfun","html_url":"https://github.com/azertyfun","followers_url":"https://api.github.com/users/azertyfun/followers","following_url":"https://api.github.com/users/azertyfun/following{/other_user}","gists_url":"https://api.github.com/users/azertyfun/gists{/gist_id}","starred_url":"https://api.github.com/users/azertyfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azertyfun/subscriptions","organizations_url":"https://api.github.com/users/azertyfun/orgs","repos_url":"https://api.github.com/users/azertyfun/repos","events_url":"https://api.github.com/users/azertyfun/events{/privacy}","received_events_url":"https://api.github.com/users/azertyfun/received_events","type":"User","site_admin":false},"created_at":"2016-02-07T21:06:43Z","updated_at":"2016-02-07T21:06:43Z","body":"Isn't define considered a preprocessor directive? It should just replace any occurence in the code, shouldn't it?"}}