From: "Greg Holdridge" Newsgroups: comp.os.msdos.djgpp Subject: PS: A mysterious event Date: Sun, 13 Aug 2000 17:36:27 +0100 Organization: Customer of Energis Squared Lines: 45 Message-ID: <8n6ir5$8rp$1@newsg4.svr.pol.co.uk> References: <8n6i6g$8cn$1 AT newsg4 DOT svr DOT pol DOT co DOT uk> NNTP-Posting-Host: modem-69.dernhelm.dialup.pol.co.uk X-Trace: newsg4.svr.pol.co.uk 966184613 9081 62.136.154.69 (13 Aug 2000 16:36:53 GMT) NNTP-Posting-Date: 13 Aug 2000 16:36:53 GMT X-Complaints-To: abuse AT theplanet DOT net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Actually, sometimes a SIGSEGV occurs instead of power off on monitor- this highlights that the problem occurs during a lodsw loop: --- code cited --- {From start of SetMode.asm} [SECTION .data] ; 320x240 data CRTParms320x240: dw 00d06h ;vertical total dw 03e07h ;overflow (bit 8 of vertical counts) dw 04109h ;cell height (2 to double-scan) dw 0ea10h ;v sync start dw 0ac11h ;v sync end and protect cr0-cr7 dw 0df12h ;vertical displayed dw 00014h ;turn off dword mode dw 0e715h ;v blank start dw 00616h ;v blank end dw 0e317h ;turn on byte mode CRT_PARM_LENGTH320x240 equ (($-CRTParms320x240)/2) [SECTION .text] {From later in SetMode.asm} mov esi,CRTParms320x240 ;point to CRT parameter table mov cx,CRT_PARM_LENGTH320x240 ;# of table entries .SetCRTParmsLoop: lodsw ;get the next CRT Index/Data pair out dx,ax ;set the next CRT Index/Data pair loop .SetCRTParmsLoop --- end code citing --- As you can see, word outs are used. Is there a problem with this sort of code in NASM? This is definitely causing a segment violation. Thanks again, Greg