{"id":1280,"date":"2022-08-30T15:15:13","date_gmt":"2022-08-30T15:15:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/10\/error-a2006-undefined-symbol-dgroup-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:15:13","modified_gmt":"2022-08-30T15:15:13","slug":"error-a2006-undefined-symbol-dgroup-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/error-a2006-undefined-symbol-dgroup-collection-of-common-programming-errors\/","title":{"rendered":"Error A2006 : undefined symbol : DGROUP-Collection of common programming errors"},"content":{"rendered":"<p>I am trying to assembly this code, but it returns an error. Could you please help me to fix it? Thanks.<\/p>\n<pre><code>INCLUDE irvine16.inc\n.data\n    array db 31h,32h,33h,34h    ;use db to define array\n    COUNT = ($-array)       ;The $ operator gives the value of the location counter.\n.code\nmain proc\n    mov ax, @data       ;copy the address of the data segment  \n    mov ds, ax      ;@data into the DS register\n    mov bx, offset array    ;the offset operator returns the 16-bit offset of a label\n    mov cx, COUNT   ;set up cx register as a counter register.  \n    mov ah, 02      ;use function 2 of int 21h - display char stored in dl on screen\nLP1: mov    dl, [bx]        ;LP1 is a label\n    int 21h\n    inc bx\n    loop    LP1     ;decrement cx;  if cx not =0,loop back to label LP1.  \n    mov ax, 4c00h\n    int 21h\nmain endp\nend main\n<\/code><\/pre>\n<ol>\n<li>\n<p>DGROUP is a 16-bits concept, so the remark in pmod&#8217;s link (it is 16-bit code, DGROUP is a 16-bit concept, make sure you use the 16-bit linker) is true.<\/p>\n<p>If that doesn&#8217;t resolve it, play with your memory model (.model), Dos is 16 years ago for me, but IIRC some segments only existed in some memory models.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-10 00:14:11. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I am trying to assembly this code, but it returns an error. Could you please help me to fix it? Thanks. INCLUDE irvine16.inc .data array db 31h,32h,33h,34h ;use db to define array COUNT = ($-array) ;The $ operator gives the value of the location counter. .code main proc mov ax, @data ;copy the address of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1280","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1280"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1280\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}