Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OUT and POKE
#1
What's the difference between POKE and OUT (besides the fact that POKE requires DEF SEG and is therefore more flexible)?
earn.
Reply
#2
PEEK and POKE mess with data in memory. INP and OUT take in and send out data to and fro hardware ports.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#3
Quote:(besides the fact that POKE requires DEF SEG and is therefore more flexible)?

POKE requires DEF SEG because memory is stored in 4 byte addresses, each consisting of a segment and an offset. To save time with the arguments, POKE only accepts one argument, which is the offset. The current segment is defined by DEF SEG.

OUT doesn't need DEF SEG or any other definer, simply because a port value always is integer.
Reply
#4
The reason you don't need DEF SEG (or some equivalent thing) with OUT is simply because port numbers are numbered sequentially. Memory addresses, at least in real mode, aren't. That's why you need DEF SEG with POKE--to tell it where to start sequentially numbering offsets from.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#5
Glenn what are you doing here! Did u migrate here as i have?
Reply
#6
It seems that you have been around for quite some time now! :oops:
Reply
#7
I think it was more of a spreading out than a migration. (Hmmmm. It might be an infiltration.)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#8
Quote:Glenn what are you doing here! Did u migrate here as i have?

He was a saint there. He is god here. :*)

Actually, we just pirated him....

Land ahooy!!!!
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#9
Smile
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#10
I too am spreading my wings. I am now on qb45.org, qbasic.com, tek-tips.com, qbasicnews.com. 8)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)