--------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: F2200007Date: 02/01/98 From: ED BEROSET Time: 05:49pm \/To: ALL (Read 1 times) Subj: Re: Directly writing to memor From: Ed Beroset Subject: Re: Directly writing to memor At 01:13 1/31/98, you wrote: > >Replying to a message of Ed Beroset to All: > > DG>>>> mov ss:[sp], eax > > >> Did you try it? Microsoft's DEBUG says "error", and > >> OpenDOS's DEBUG says "Incorrect name of index register". > > EB> That's because it's not a legal addressing mode. > >.386 >... >mov [esp], eax >... >.8086 >:) You cheated! ;-) Seriously, that's esp, not sp. The instruction "mov ss:[sp],eax" isn't legal in 32-bit or 16-bit mode. Ed -!- --- * Origin: The Circuit! Board * Spokane * (1:346/100) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: F2200008Date: 01/31/98 From: TIM HUTZLER Time: 03:19pm \/To: DARRYL GREGORASH (Read 1 times) Subj: Re: circular buffer DG>Replying to a message of Tim Hutzler to Darryl Gregorash: TH>>Where did he go, anyway? [grin] DG>>You don't think we scared him away, do you? :) TH>Gee, we're the nices geeks in the world. Who would be scared TH>of us? [grin] DG>He probably just stole all our code and ran.. too bad, I DG>was gonna post the code for a circular stack, but now I DG>probably won't :) And I thought it was a circular queue... [grin] ___ Blue Wave/QWK v2.12 --- Maximus/2 3.01 * Origin: Madman BBS * Chico, California * 530-893-8079 * (1:119/88) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: F2200009Date: 01/31/98 From: JASEN BETTS Time: 07:06am \/To: RONALD SCHLEGEL (Read 1 times) Subj: Control Codes RS> I am mainly trying to get an ASCII #3 (a heart) to display. I am RS> working on a door (in PowerBASIC) that the library uses "heart-codes" ^^^^^ print chr$(3); --- EzyQwk V1.20 * Origin: CSS Brisbane, Qld, Australia. (61-7-3367-3890) (3:640/350) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: F2200010Date: 01/31/98 From: JASEN BETTS Time: 07:07am \/To: DARRYL GREGORASH (Read 1 times) Subj: Directly writing to memor DG> That means nothing can ever be written onto the bottom of the stack, ye DG> has always struck me as rather odd.. no since different sized things can go onto the stack... push Single register 1 word near call 1 word far call 2 words interrupt call 3 words all registers lots of words having sp point to the last item on the stack means that SP can point to the the last thing used and be moved the correct amount before writing.. it also menas SP can be initialised to 0 and the first push will write to bytes FFFF & FFFE --- EzyQwk V1.20 * Origin: CSS Brisbane, Qld, Australia. (61-7-3367-3890) (3:640/350) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: F2200011Date: 02/01/98 From: JASEN BETTS Time: 12:04am \/To: KEN HRYNCHUK (Read 1 times) Subj: RT Delay Bug? I found the answer... in a message in the pascal echo the first word of the bios timer wraps normally each hour until midnight when it skips forward about 10 seconds :-) your timer prog doesn't know about this skip... LEONARD ERIKSON to me :) in the pascal echo. LE> But 14,318,180 Hz divided by 3, divided by 2^18, multiplied by 3600 LE> (number of seconds in an hour) is 65543 ticks per hour, *not* 2^16. LE> The number of ticks in 24 hours (86400 seconds) is 1573042.236... LE> 24x2^16 is 1572864. The difference is around ten seconds worth of LE> ticks. :-) --- EzyQwk V1.20 * Origin: CSS Brisbane, Qld, Australia. (61-7-3367-3890) (3:640/350) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: F2200012Date: 02/02/98 From: SYLVAIN LAUZON Time: 01:20am \/To: ALL (Read 1 times) Subj: need a little help I was reading some texts about using arithmetic instructions and i would like to know if ST and ST(0) register is the same? Can i see the content of the ST(0) register? --- Renegade v5-11 Exp * Origin: CoM BBS (merely seeking the truth) (1:167/146) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: F2200013Date: 02/02/98 From: DARRYL GREGORASH Time: 12:04pm \/To: TIM HUTZLER (Read 1 times) Subj: circular buffer Replying to a message of Tim Hutzler to Darryl Gregorash: TH>> scared of us? [grin] DG>> He probably just stole all our code and ran.. too bad, I DG>> was gonna post the code for a circular stack, but now I DG>> probably won't :) TH> And I thought it was a circular queue... [grin] No, that is what I already posted.. his loss, if he really did want a stack --- FleetStreet 1.21 NR * Origin: BIG BANG Burger Bar: Regina SK Canada (1:140/86) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: F2200014Date: 02/02/98 From: DARRYL GREGORASH Time: 12:05pm \/To: ED BEROSET (Read 1 times) Subj: Directly writing to memor Replying to a message of Ed Beroset to All: >> .386 >> ... >> mov [esp], eax >> ... >> .8086 >> :) EB> You cheated! ;-) Seriously, that's esp, not sp. The EB> instruction "mov ss:[sp],eax" isn't legal in 32-bit or EB> 16-bit mode. I know I cheated.. but as I mentioned, I had forgotten that sp wasn't a legal index register. I've evidently been writing too much code for DPMI, and not enough for plain-DOS :) --- FleetStreet 1.21 NR * Origin: BIG BANG Burger Bar: Regina SK Canada (1:140/86) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: F2200015Date: 02/02/98 From: DARRYL GREGORASH Time: 12:07pm \/To: JASEN BETTS (Read 1 times) Subj: Directly writing to memor Replying to a message of Jasen Betts to DARRYL GREGORASH: DG>> That means nothing can ever be written onto the bottom of DG>> the stack, ye has always struck me as rather odd.. JB> no since different sized things can go onto the stack... Forget about the calls and ints.. when you decrement the stack pointer, then write to the stack, nothing can be written onto the bottom of the stack. Period. OTOH, if you write first, then decrement, you have problems with stack overflow, unless you are using a counter somewhere to keep track of the number of items in the buffer (whether that is a queue or a stack, it does not matter). JB> it also menas SP can be initialised to 0 and the first push JB> will write to bytes FFFF & FFFE Are you really sure of that? I'm not going to check, but more likely it will trigger a stack exception; it certainly will in 32-bit mode. Besides, most people are not in the habit of allocating a 64K stack.. *and* such segment wrap may or may not happen on anything but an 8088 or 286.. I don't recall if segment wrap is a feature of the 386+ 16-bit mode.. in any event, IMO it is shoddy programming practice to rely on something like that. --- FleetStreet 1.21 NR * Origin: BIG BANG Burger Bar: Regina SK Canada (1:140/86) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: F2200016Date: 02/02/98 From: SAM IZZO Time: 03:01am \/To: JEFF BRIELMAIER (Read 1 times) Subj: Re: Year2000 problem -=> Quoting Jeff Brielmaier to Sam Izzo <=- JB> The year is stored in CMOS byte 09h and the Century is stored in CMOS JB> byte 32h. Ahh, ok, that clears up that! I missed that bit in the CMOS.LST file. JB> This indicates that the Real Time Clock (RTC) chip in your computer is JB> not Year2000 compliant. (not surprising) Hrm.. So most modern PCs aren't compliant, then? But generally, operating systems will make it all work out alright, though? I presume that the OSs calculate the day of week, rather than reading it from the CMOS. Sam ... Taglines are irrelevant. You will be assimilated into the Blue Wave. --- FMail/386 1.20+ * Origin: Comms Barrier BBS +61.3.9585.1112, +61.3.9583.6119 (3:632/533)