80 will determine the 4XXX values (determined by the first pop) of all actors that have active bits in the second pop. For your example, let's say that an enemy runs that code and party member 1 is dead:
(this gets pushed to the stack)
Actor 0: 345
Actor 1: 65535 (this is universally considered to be a non-value so doesn't meet the "greatest value" criteria)
Actor 2: 144
Actor 3: 65535
Actor 4: 65535
Actor 5: 65535
Actor 6: 65535
Actor 7: 65535
Actor 8: 65535
Actor 9: 65535
Then, 85 pulls that entire list and creates an identical list with the bit mask of that actor indicating whether or not that actor fits the parameter:
(this gets pushed to the stack)
Actor 0: 0
Actor 1: 0
Actor 2: 2
Actor 3: 0
Actor 4: 0
Actor 5: 0
Actor 6: 0
Actor 7: 0
Actor 8: 0
Actor 9: 0
Confusing, I know. The next opcode to pop a value will decide what to do with this set. They might do a bit-wise OR or perhaps just take the top value and ignore the rest.
I tried to type up some C-based structure for the stack, but I just can't figure it out. It is a list of pairings: a type, and a value. The types are either magnitude (raw numbers), addresses( usually between 0000 and 4260, but can go all the way to FFFF), or Actor Masks (type 2X) as mentioned.
If you know how each opcode handles values on the stack it's completely possible to construct it at any point in the program flow. I've done it lots of times.