Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!jarthur!petunia!news From: dgross@polyslo.CalPoly.EDU (Dave Gross) Newsgroups: comp.sys.handhelds Subject: Tandy PC-6: ASSEMBLY source code "Greatest Common Factor" Message-ID: <261fd9a1.296@petunia.CalPoly.EDU> Date: 9 Apr 90 00:38:57 GMT Organization: The Bleeding-Hearts and the Artists Lines: 40 :START :32 :READ :0 :10 {32:500A READ00 10} :ST :0 :M {33:D031 ST 00 49} :READ :1 :10 {34:540A READ10 10} :ST :1 :N {35:D432 ST 10 50} L1 :LD :0 :M {36:C031 LD 00 49} :SUB :0 :N {37:B032 SUB 00 50} :JNZ :0 :L2 {38:1029 JNZ 00 41} :WRITE :3 :10 {39:6C0AWRITE30 10} :HJ :0 :L1 {40:0024 HJ 00 36} L2 :JC :2 :L3 {41:282F JC 20 47} :LD :0 :N {42:C032 LD 00 50} :SUB :0 :M {43:B031 SUB 00 49} :ST :0 :N {44:D032 ST 00 50} :LD :3 :N {45:CC32 LD 30 50} :JC :3 :L1 {46:2C24 JC 30 36} L3 :ST :0 :M {47:D031 ST 00 49} :JC :3 :L1 {48:2C24 JC 30 36} M :RESV :1 N :RESV :1 :END :L1 *** SAMPLE RUN *** COMPUTER OUTPUT YOUR INPUT -------------------------- --------------------------- Ready P0 Asmbl/Source/Cal A 8:Go/Dump/Source/Cal G Go 36 _ 32 Go 32 _ GR0 (10) _ 24 (for instance) GR1 (10) _ 32 (for instance) GR3 (10) 8 (the answer) -- <^><^><^><^>- dgross@polyslo.CalPoly.EDU -<^><^><^><^> A monk asked Tozan when he was weighing some flax: "What is Buddha?" Tozan said: "This flax weighs three pounds."